The import was failing, it was not importing the bad data. The only thing you could not do was import the bad data.
Code:trade.py import --plug=maddavo <bad error> trade.py run --from sol ... <still works, has old data>
Unfortunately that's not how it was. It was stuck at rebuilding the cache file and it tried to rebuild it and fail with every call of trade.py, so it was indeed broken. Here is some output from yesterday:
Code:
trade.py local --ly=0 Branglal
NOTE: Rebuilding cache file: this may take a moment.
Traceback (most recent call last):
File "trade.py", line 102, in <module>
main(sys.argv)
File "trade.py", line 52, in main
tdb = tradedb.TradeDB(cmdenv, load=cmdenv.wantsTradeDB)
File "/Users/andreas/Documents/EliteData/tradedangerous/tradedb.py", line 537, in __init__
self.reloadCache()
File "/Users/andreas/Documents/EliteData/tradedangerous/tradedb.py", line 607, in reloadCache
cache.buildCache(self, self.tdenv)
File "/Users/andreas/Documents/EliteData/tradedangerous/cache.py", line 998, in buildCache
processImportFile(tdenv, tempDB, Path(importName), importTable)
File "/Users/andreas/Documents/EliteData/tradedangerous/cache.py", line 885, in processImportFile
for linein in csvin:
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/codecs.py", line 313, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 147-148: invalid continuation byte
It downloads the data to "import.prices". Then it tries to import that.
If that succeeds, it renames your data/TradeDangerous.prices to data/TradeDangerous.prev and then it generates a new TradeDangerous.prices.
So ... you're already pretty well covered![]()
Ok, I didn't know that. But does it rename the old file before it imports? Because it never finished importing, and just left itself in a corrupted state.