In-Development TradeDangerous: power-user trade optimizer

I Have done that and now I get tons of line of "Warning unrocognized system", so I manually downloaded the system and station csv files, to no avail, I still get the same problem.

Maybe TD is broken today :)
 
Last edited:
Ok, it is now working.

Basically, version 6.18.4 is broken and does not work at all. I downloaded 6.18.3 and everything is fine and dandy

Crouz
 
Basically, version 6.18.4 is broken and does not work at all. I downloaded 6.18.3 and everything is fine and dandy

I don't know what exactly you have done but I just tried 6.18.4 and it's working without problems.

  1. Download v6.18.4 as zip (https://bitbucket.org/kfsone/tradedangerous/get/6.18.4.zip)
  2. uncompressed into new directory
  3. build the cache (trade.py buildcache)
  4. import maddavo (trade.py import --plug=maddavo --option=csvs)
  5. ready, no errors, no warnings
 
i d/l the zip and copied into my existing dir, things went badly :( massive lists of unrecognised items, systems + stations then stops with errors. Will try a clean folder :)
 
additional, with newest vers from zip ship names + item names unrecognised then ends like this (fresh directory) after update from maddavo with command trade.py import --plug=maddavo --opt=corrections --opt=csvs

import.prices:786251 WARNING Unrecognized item name: "CHEMICAL WASTE"
import.prices:786252 WARNING Unrecognized item name: "SCRAP"
import.prices:786254 WARNING Unrecognized item name: "NON-LETHAL WEAPONS"
import.prices:786255 WARNING Unrecognized item name: "REACTIVE ARMOUR"
NOTE: Import complete: 0 items (0 buy, 0 sell) for 11,573 stations in 6,829 systems
Traceback (most recent call last):
File "C:\Temp\TradeDangerous\trade.py", line 102, in <module>
main(sys.argv)
File "C:\Temp\TradeDangerous\trade.py", line 76, in main
results = cmdenv.run(tdb)
File "C:\Temp\TradeDangerous\commands\commandenv.py", line 80, in run
return self._cmd.run(results, self, tdb)
File "C:\Temp\TradeDangerous\commands\import_cmd.py", line 111, in run
if not plugin.run():
File "C:\Temp\TradeDangerous\plugins\maddavo_plug.py", line 718, in run
self.import_prices()
File "C:\Temp\TradeDangerous\plugins\maddavo_plug.py", line 686, in import_prices
pathlib.Path(self.filename),
File "C:\Temp\TradeDangerous\cache.py", line 1230, in importDataFromFile
regeneratePricesFile(tdb, tdenv)
File "C:\Temp\TradeDangerous\cache.py", line 1196, in regeneratePricesFile
debug=tdenv.debug)
File "C:\Temp\TradeDangerous\prices.py", line 62, in dumpPrices
longestName = max(items.values(), key=lambda ent: len(ent[0]))
ValueError: max() arg is an empty sequence
 
Last edited:
i d/l the zip and copied into my existing dir, things went badly :( massive lists of unrecognised items, systems + stations then stops with errors. Will try a clean folder :)

The problem you are getting is because the current code base will always be behind your current data. To avoid this you should rename the "data" directroy to something else before overwriting and than, after overwriting, delete the "data" dir and rename your old one back to "data". This should get rid of your problems.

How do update with zip files:
  • rename your current "data" folder to "data.current"
  • download zip
  • uncompress and overwrite
  • delete "data" directory
  • rename "data.current" back to "data"
  • ready
 
additional, with newest vers from zip ship names + item names unrecognised then ends like this (fresh directory) after update from maddavo with command trade.py import --plug=maddavo --opt=corrections --opt=csvs

import.prices:786251 WARNING Unrecognized item name: "CHEMICAL WASTE"
import.prices:786252 WARNING Unrecognized item name: "SCRAP"
import.prices:786254 WARNING Unrecognized item name: "NON-LETHAL WEAPONS"
import.prices:786255 WARNING Unrecognized item name: "REACTIVE ARMOUR"
...

I think your problem is that your first command was "import" instead of "buildcache"

With an fresh installation you don't have a database (cache). So you import into an emty database only the Corrections, System, Station and ShipVendor data. The import than export the "whole" database which has no ships, items or categories, so the import will fail.
 
Last edited:
trade.py automatically performs a buildcache for a fresh install, but ty for the suggestion :)

edit : just in case, i did a build cache and uppdate again, same result.
 
Last edited:
trade.py automatically performs a buildcache for a fresh install, but ty for the suggestion :)

edit : just in case, i did a build cache and uppdate again, same result.

Hm, yeah somethings wrong if you use "Download repository". It builds an empty database. If you download the v6.18.4 it works.
 
It has nothing to do with git, it's a bug in the latest code (after v6.18.4).

But nothing wrong with learning something new every now and than :)
 
I mean for doing git pulls and setting version to pull etc, i know the bugs not git related :) but yeah, new things are good, even if they're a pita like git. My amature coding never really needed a vcs.
 
Continued exploring and had done about 60 systems when I finally found first unknown system with coriolis (L pad) station in it. So yeah apparently its not all unknowns as outposts, but you have to think how rare the large stations are then in this context. I know its a big populated space, but 60 systems (mostly in federation and 5+ in empire space) before finding one, wow.

Certainly this puts my idea to bed that I'll go explore unknown systems and fill in new stations to station.csv to really open up the markets, heh yep that's not going to happen with this rate :)
 
I checked 101 systems so far with 208 stations. 50 systems had only outposts, 24 had only starports and 27 had both.

I didn't write down which of the systems where unknown but I think you were just unlucky :)
 
Each and every one of my about 60 systems checked were unknowns with economy, like I already said.

Anyways I just thought that the people doing trading with large ships would find this information interesting. That's all.
 
It appears that the -vv option is failing. I get errors when using it, but not when using -vv.

$ trade.py run --cr=20000000 --cap=436 --ly-per=18.92 --pad=l --jumps=3 --loop --avoid=mabe,amahu,asgaa,bd-024304,hr6541 -vv
Traceback (most recent call last):
File "./trade.py", line 102, in <module>
main(sys.argv)
File "./trade.py", line 79, in main
results.render()
File "c:\Users\dan\Source\TradeDangerous\commands\commandenv.py", line 24, in render
cmdenv._cmd.render(self, cmdenv, tdb)
File "c:\Users\dan\Source\TradeDangerous\commands\run_cmd.py", line 1279, in render
print(routes.detail(cmdenv))
File "c:\Users\dan\Source\TradeDangerous\tradecalc.py", line 330, in detail
age=age,
ValueError: Invalid format specifier
 
My amature coding never really needed a vcs.
Off topic, but as another amateur coder, I felt the same way until I taught myself git (I code in R and a little C++ through Rcpp), and I am SO glad I did. The relief when something goes hideously sideways, to be able to go back to a previous commit is palpable. I don't use the fancy rebasing commands and whatnot, so my commit log looks like a stream-of-consciousness ramble, but 1) knowing what changes were made at each step and why and 2) being able to turn back time, even if all you are writing is "Hello World", LEARN A VCS! OK, back to spaceflight
 
It appears that the -vv option is failing. I get errors when using it, but not when using -vv.
Same with -vvv:

Code:
G:\Elite\TD>trade.py run -vvv --ly 15.40 --empty 17.65 --insurance 135000 --cap 33 --credits 776136 --from SOL/M.G --to
DUAMTA/Herr
NOTE: Pruned 9 origins too far from any end stations
Traceback (most recent call last):
  File "G:\Elite\TD\trade.py", line 102, in <module>
    main(sys.argv)
  File "G:\Elite\TD\trade.py", line 79, in main
    results.render()
  File "G:\Elite\TD\commands\commandenv.py", line 24, in render
    cmdenv._cmd.render(self, cmdenv, tdb)
  File "G:\Elite\TD\commands\run_cmd.py", line 1279, in render
    print(routes[i].detail(cmdenv))
  File "G:\Elite\TD\tradecalc.py", line 330, in detail
    age=age,
ValueError: Invalid format specifier

Specifying --detail --detail also throws the error.
 
Last edited:
Is anyone else seeing errors on a clean install? I thought I messed something up yesterday and deleted the whole folder. I pulled down the latest build, tried to do the maddavo import
trade.py import --plug maddavo --opt stations,systems

NOTE: Added new system #1559: ARGENOI [139.625,-10.9375,101.875]
NOTE: Added new system #1560: ARGESTES [21.78125,-20.15625,-58.9375]
NOTE: Traceback (most recent call last):
File "E:\trade\trade.py", line 102, in <module>
main(sys.argv)
File "E:\trade\trade.py", line 76, in main
results = cmdenv.run(tdb)
File "E:\trade\commands\commandenv.py", line 80, in run
return self._cmd.run(results, self, tdb)
File "E:\trade\commands\import_cmd.py", line 111, in run
if not plugin.run():
File "E:\trade\plugins\maddavo_plug.py", line 708, in run
self.import_systems()
File "E:\trade\plugins\maddavo_plug.py", line 302, in import_systems
commit=False,
File "E:\trade\tradedb.py", line 777, in addLocalSystem
ID, name, x, y, z
File "E:\trade\tradeenv.py", line 61, in __NOTE_ENABLED
print("NOTE:", outText.format(*args, **kwargs), file=file)
File "E:\Python34\lib\encodings\cp437.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_map)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\xc1' in position 30: character maps to <undefined>

I found it to be a single system, but cannot remove it because every time I do the pull, it gets the same data.

Anyone willing to provide me a way to load the system.csv that I have already downloaded and edited the "bad" system?


*************
How to duplicate:

Delete entire tradedangerous folder.
Clone from https://bitbucket.org/kfsone/tradedangerous
Run trade.py import --plug maddavo --opt stations,systems (to pull in all updates)
Fails...
 
Last edited:
Back
Top Bottom