I was trying to re-balance existing positions every month to still make up an equal portion of the portfolio (that's why I used order_target_percent and used data, because i wanted both to buy new positions and re-balance existing ones). The same goes for the SPY (I wanted to ensure that it was being balanced to the same percentage of my portfolio value every period).
I don't know why the weights ended up as 0.5, (I think because these odd objects used to hold equities and such sometimes return length of 1 unless you do [sec for sec in X] which is quite new to me) since context.top_500 should have held some sort of list of 500 or so stocks.
The comments were nightmarish (I'd never do that sort of thing in finalized code) but since I'm still learning the language, I was putting incomplete docstrings in the code, as well as commenting out lines of code that I replaced but thought I might need later (if the replacement code worked worse), and I was using triple quotes to write personal notes to myself, i.e. for the difference between data, get_open_orders(), context.portfolio.positions, and context.the_secs. I still don't really know what the difference between all of these are, in terms of the data they hold, the form they hold it in (or how to comfortably retrieve it) since most of them (with my log.info() functions) seemed to start at around 500, and continuously go upwards as the code ran, which led me to believe that none of my stocks were ever sold.
Anyhow, thank you so much for your help!