In-Development TradeDangerous: power-user trade optimizer

HI
i've just reinstalled TD after upgrading to windows 10 ( and i wished i'd remembered to keep a copy of the file before i did a clean install)

i've used sourcetree to pull a copy down and all used the zip as a test and i keep getting this same error when i try to run TD


C:\trade>trade.py
Traceback (most recent call last):
File "C:\trade\trade.py", line 38, in <module>
from commands import *
File "C:\trade\commands\__init__.py", line 2, in <module>
from commands.commandenv import CommandEnv
File "C:\trade\commands\commandenv.py", line 4, in <module>
from tradedb import AmbiguityError, System, Station
File "C:\trade\tradedb.py", line 744
yield from self.systemByID.values()
^
SyntaxError: invalid syntax


C:\trade>

any idea's where i've screwed up ? or as to whats giving me the error

thanks

Looks like maybe you are using Python 2? TD requires 3.4.
 
thanks for the answer but i have both copy's 2 + 3.4 of Python installed on my pc , if its the case of TD looking @ v 2 of Python , whats the best way of making it use 3.4 by default
 
Last edited:
new account and edapi

Hi, has anyone just purchased the Lifetime Expansion Pass and tried to use command 'trade.py import -P edapi -O eddn' with the new account.
.
I get the following error
Something went terribly wrong. The login credentials appear correct, but we are being denied access. Sometimes the API is slow to update, so if you are authenticating for the first time, wait a minute or so and try again. If this persists try using --debug and report this.
 
Hi, has anyone just purchased the Lifetime Expansion Pass and tried to use command 'trade.py import -P edapi -O eddn' with the new account.
.
I get the following error
Something went terribly wrong. The login credentials appear correct, but we are being denied access. Sometimes the API is slow to update, so if you are authenticating for the first time, wait a minute or so and try again. If this persists try using --debug and report this.

Hello! Plugin author here.

Did you try again and it is consistently failing?

Do you have access to the iPhone app? If so does it work?
 
Hello! Plugin author here.

Did you try again and it is consistently failing?

Do you have access to the iPhone app? If so does it work?

No access to iphone so cant try that yet

Have tried again/ and on other machines with clean system no cookies - always same response, my brothers older premium beta account works

Also tried EDMC and get Error: Invalid Credentials.

looks like an API issue with new accounts so now waiting on others with new/second accounts to try this
 
Where does TD get its database/station/system information from?

EDDN?

Does it use eliteOcr?
Through its own database or we upload our eliteocr to eddn then TD gets info from eddn?
 
Where does TD get its database/station/system information from?
EDDN?
Does it use eliteOcr?
Through its own database or we upload our eliteocr to eddn then TD gets info from eddn?

TD comes with a limited set of data about stations. This data was crowdsourced from users. You have the option to not use this and build your own data if you prefer.
TD doesn't come with any price data - you can enter this yourself OR there is a plugin to get crowdsourced price data from MMS. The plugin can also get the latest crowdsourced station data.
System data came from Frontier themselves with additional crowdsourced data from EDSC.

The data source for MMS is mainly EDDN - for price data and shipyard data. Station data is syncronised daily with EDDB. Data can also be uploaded directly from users to MMS but since EDDN came up this doesn't happen much. System data is occasionally updated from EDSC but there is a bug in the GM at the moment which makes this problematic to verify - we have all the systems that have stations so this isn't too much of an issue.

EliteOCR can be used to generate a .prices file and imported directly to the local TD, OR it can be sent to EDDN for incorporation into MMS.
There are also other tools that can be used to enter/capture price data and sent via EDDN to MMS.
 
Last edited:
TD comes with a limited set of data about stations. This data was crowdsourced from users. You have the option to not use this and build your own data if you prefer.
TD doesn't come with any price data - you can enter this yourself OR there is a plugin to get crowdsourced price data from MMS. The plugin can also get the latest crowdsourced station data.
System data came from Frontier themselves with additional crowdsourced data from EDSC.

The data source for MMS is mainly EDDN - for price data and shipyard data. Station data is syncronised daily with EDDB. Data can also be uploaded directly from users to MMS but since EDDN came up this doesn't happen much. System data is occasionally updated from EDSC but there is a bug in the GM at the moment which makes this problematic to verify - we have all the systems that have stations so this isn't too much of an issue.

EliteOCR can be used to generate a .prices file and imported directly to the local TD, OR it can be sent to EDDN for incorporation into MMS.
There are also other tools that can be used to enter/capture price data and sent via EDDN to MMS.


Let's see if I understand this correctly.

I can use TD and get all community driven data using the MMS website.. ? (or its actually a plugin that I have to download?) If so.. where do I get the plugin?

I can help out along the way by using EliteOCR and uploading to EDDN (which pretty much is like uploading to TD [via MMS])

Do I need to do anything with EDDB? Or this is something that TD automatically gets updated with ??

- - - Updated - - -

Concerning MMS...

Is the info on the site pertaining to the "last update" correct??

Seems to be months old in most cases.

errr.. maybe I am just looking at the date backwards... looks like the Day might come first.. sorry.. Im used to MM/DD/YY
 
Last edited:
Next question:

trade.py import import.prices

When creating the import.prices file using EliteOCR... Do I need to copy this file into the Trade Dangerous directory ?
 
I can use TD and get all community driven data using the MMS website.. ?

Yes. You don't even have to visit the MMS website - all is done via the Maddavo plugin that comes with TD. The complete price data is split into three files - a full file that is updated every 24hrs, a 2-day file that is updated every 2hrs and a 3hr file that is updated whenever updates are received. You need all three files to ensure you have a full data set. To get started you just enter these commands:
trade import -P maddavo -O corrections,stations,systems,shipvendors,usefull,force
trade import -P maddavo -O use2d,force
trade import -P maddavo -O use3h,force,exportcsv

Then going forward you can just use:
trade import -P maddavo -O corrections,stations,shipvendors,exportcsv

If it downloads a price file other than the 3h file, then just run it again until you get a 3h file - then you know you have all the latest data.

I can help out along the way by using EliteOCR and uploading to EDDN (which pretty much is like uploading to TD [via MMS])

Yes.

Do I need to do anything with EDDB? Or this is something that TD automatically gets updated with ??

TD gets updates from EDDB via MMS so no, you don't have to. But if you come across any info for a station that needs updating (eg: pad size, distance, blackmarket etc.) then you can update it in any of the following ways:
- Update your local Station.csv (with a text editor) and upload it to MMS. (Your local data will be updated instantly since that's what you're updating)
- Find the station on EDDB and update it there. (It may take 24hrs to filter through to MMS and then to you)
- Update the station info on MMS using the Edit Stations page

Concerning MMS...
Is the info on the site pertaining to the "last update" correct??
Seems to be months old in most cases.
errr.. maybe I am just looking at the date backwards... looks like the Day might come first.. sorry.. Im used to MM/DD/YY

The timestamps on the files are UTC which is little-endian, Gregorian DMY - common to the majority of Earth and stations in inhabited space.

Next question:
trade.py import import.prices
When creating the import.prices file using EliteOCR... Do I need to copy this file into the Trade Dangerous directory ?

Yes, the import.prices file needs to be in the TD directory. You can set EliteOCR to save the import.prices file to the TD directory all the time.

There is also a plugin that comes with TD (EDAPI) that automatically gets the prices for the last station at which you docked. The command is:
trade import -P edapi -O eddn
You need to enter your ED username and password to use it. That command will import prices locally and also transmit to EDDN. This a more accurate and faster alternative to EliteOCR if you prefer.

Cheers,
Maddavo
 
Last edited:
There is also a plugin that comes with TD (EDAPI) that automatically gets the prices for the last station at which you docked. The command is:
trade import -P edapi -O eddn
You need to enter your ED username and password to use it. That command will import prices locally and also transmit to EDDN. This a more accurate and faster alternative to EliteOCR if you prefer.

Cheers,
Maddavo

Had no clue about this.

So rather than taking screenshots of the commodity data..
Using eliteOCR (and training it) to translate this data..
then transferring this data to specific trade tool and EDDN

we can just use this command..
all the same information is downloaded (from Frontier) with 100% accuracy (including commodity, prices, quanity, etc)
AND transferred to EDDN (to get distributed to other tools and players)

And we need to run this each time we visit a station to update that particular set of information??

this sounds too good to be true..
what am I missing?

Edit:
I found something that seems similar.
EDMC (maybe?)

Seems that this little program downloads the same data (I assume for those who are not using TD) ??
 
Last edited:
I've tried to make large hop number route, for example like this:
Code:
trade.py run --cr 10000000 --cap 532 --empty 18.35 --ly 12.70 -vvv --prog --pad l --unique --jumps 4 --hops 32 --ls-max 1000 --gpt 1200 --avoid FACECE
With the today's database that 32 hops work, but if I change it to 33 TD tells me: trade.py: ERROR: Too many hops without more optimization

How should I overcome hop limit, as I don't seem to get TD to calculate much more than that unique hops? I would like to make 60 or even 120 unique hop mega route :)

Right now I've done them in 30 hop chunks, first I do the first 30 and gather their system names. Then I do next 30 chunk where I use --avoid to insert all system names from the previous chunk. Then I repeat this two more times to reach total of 120 unique hops. I bit of a handful and also no way to refresh that route as prices change, you'll generate it and have to then use immediately or "as is" later on with most likely changed prices.

I've done this as unique hops because the route I'm after has to be interesting kind of exploration type trading. Its so boring to hammer A -> B -> A systems all the time. However it necessarily don't have to have all the systems unique, but the difference with and without --unique parameter is massive as you all know.

Would be really nice to be able to have TD calculate large, even 120 unique hop route with single command without the --avoid hassle.

For me TD being slow for calculating such huge tasks is no problem.
 
With the today's database that 32 hops work, but if I change it to 33 TD tells me: trade.py: ERROR: Too many hops without more optimization

How should I overcome hop limit, as I don't seem to get TD to calculate much more than that unique hops? I would like to make 60 or even 120 unique hop mega route :)

You could change the code (file: commands/run_cmd.py, line: 757) from:
Code:
    if cmdenv.hops > 32:
to
Code:
    if cmdenv.hops > 120:
or whatever number you want and see what happens.

edit: I tried 120 hops and timed it: 78min 47.533sec

Code:
Gazelle@DOSE ~/tradedangerous (maddavo)
$ time trade.py run --capacity 27 --credits 13121221 --ly-per 18.42 --from "XI HARA/Roskam Landing" --jumps-per 1 --unique --hops 120
XI HARA/Roskam Landing -> CD-64 139/Christa Mcauliffe
  XI HARA/Roskam Landing: 27 x Gold,
  FUTHORC/Neujmin Hub: 27 x Beryllium,
  CASPATSURIA/Binney Dock: 27 x Auto-Fabricators,
  LTT 9810/Lopez Terminal: 27 x Imperial Slaves,
  CD-66 2585/Dahm City: 27 x Power Generators,
  GRAUDIKA/Gustafsson Terminal: 27 x Palladium,
  ATFERO/Brothers City: 27 x Imperial Slaves,
  RHO INDI/Erikson Retreat: 27 x Indite,
  LTT 8190/Rich Terminal: 27 x Gallium,
  EHECATL/Barratt Port: 27 x Imperial Slaves,
  ANEKALITI/Potrykus Gateway: 27 x Clothing,
  LFT 1672/Jensen Horizons: 27 x Semiconductors,
  LHS 3836/Gell-Mann Station: 27 x Mineral Extractors,
  LHS 449/Perry Station: 27 x Superconductors,
  WOLF 562/Hopkins Port: 27 x Performance Enhancers,
  LHS 411/Shuttleworth Platform: 27 x Palladium,
  AULIN/Edwards Ring: 27 x Performance Enhancers,
  MELIAE/Hadfield Hub: 27 x Narcotics,
  LHS 2936/Fraser Orbital: 27 x Consumer Technology,
  RAHU/Acharya Station: 27 x Beryllium,
  G 224-46/Zebrowski Ring: 27 x Silver,
  LAWD 52/Coles Gateway: 27 x Narcotics,
  LAIAWAWAL/Roberts Port: 27 x Marine Equipment,
  BA BAO/Fuca Market: 27 x Tobacco,
  BYLGIT/Harrison City: 27 x Narcotics,
  9 URSAE MINORIS/Hartog Settlement: 27 x Palladium,
  MEINJHALARA/Fremont Port: 27 x Resonating Separators,
  LIBAIA BARA/Le Guin Plant: 27 x Palladium,
  NLTT 41463/Varthema Terminal: 27 x Imperial Slaves,
  HAKKIPIKKI/De Balboa Stop: 27 x Gallite,
  LTT 14437/Bridger Base: 27 x Palladium,
  GLIESE 563.1/Brand Enterprise: 27 x Narcotics,
  G 166-21/Lagrange Dock: 27 x Superconductors,
  LEUCING/Grassmann Orbital: 27 x Battle Weapons,
  BD+22 2632/Ellern Ring: 27 x Narcotics,
  BD+23 2640/Wagner Dock: 27 x Tantalum,
  ROSS 835/Joule Enterprise: 27 x Progenitor Cells,
  LTT 5259/Mitchell Colony: 27 x Palladium,
  CYBELE/Illy Enterprise: 27 x Power Generators,
  DOMOTWA/Coke Dock: 27 x Palladium,
  MALJENNI/Drew Vision: 27 x Beryllium,
  17 CRATERIS/Al-Jazari Port: 27 x Silver,
  KORRO KUNG/Delucas City: 27 x Narcotics,
  DAKSAKHI/Nasmyth City: 27 x Marine Equipment,
  HR 4803/Sadi Carnot Hub: 27 x Tea,
  HUN NAL YEH/Vesalius Colony: 27 x Biowaste,
  RIEDQUAT/La Soeur Du Dan Ham: 27 x Narcotics,
  CD-35 9019/Wright City: 27 x Mineral Extractors,
  AKU/Kaleri Terminal: 27 x Palladium,
  YORATES/Zalyotin Dock: 27 x Superconductors,
  BELANIT/Pavlov Dock: 27 x Crop Harvesters,
  GABRACENI/Stanley Station: 27 x Tobacco,
  SUNGAI/Forest Park: 27 x Personal Weapons,
  LTT 7857/Velazquez Dock: 27 x Superconductors,
  EHECATL/Hackworth Orbital: 27 x Imperial Slaves,
  GEBEL/Theodorsen Station: 27 x Beryllium,
  EHECATL/Liebig Station: 27 x Imperial Slaves,
  GEBEL/Van de Sande Bakhuyzen Station: 27 x Beryllium,
  EHECATL/Sellers City: 27 x Imperial Slaves,
  GEBEL/Riess Hub: 27 x Superconductors,
  EHECATL/Michelson Port: 27 x Imperial Slaves,
  ZEARLA/Payson Hub: 27 x Tobacco,
  NERTHUS/Muller Station: 27 x Imperial Slaves,
  APARCTIAS/Hancock Refinery: 27 x Beryllium,
  LFT 37/Onnes Gateway: 27 x Imperial Slaves,
  ANINOHANU/Avicenna Refinery: 27 x Beryllium,
  LFT 37/Savinykh Hub: 27 x Imperial Slaves,
  ALECTRONA/Russ City: 27 x Crop Harvesters,
  LFT 37/Roentgen Hub: 27 x Imperial Slaves,
  LHS 1122/Laurent Orbital: 27 x Resonating Separators,
  ARYAMIN/Kuchner Enterprise: 27 x Palladium,
  OMICRON GRUIS/Niijima Gateway: 27 x Imperial Slaves,
  LP 214-1/Geston Gateway: 27 x Bertrandite,
  CD-63 1560/Watanabe City: 27 x Beryllium,
  TEPERTSI/Zhu City: 27 x Imperial Slaves,
  MARA/Richer City: 27 x Gallium,
  TEPERTSI/Zander Dock: 27 x Imperial Slaves,
  CD-66 2585/Witt Terminal: 27 x Marine Equipment,
  LTT 9810/Minkowski Orbital: 27 x Imperial Slaves,
  CEGREETH/Volta Orbital: 27 x Crop Harvesters,
  LTT 9810/Gutierrez Terminal: 27 x Imperial Slaves,
  SEGOVEDUWA/Mason Hub: 27 x Consumer Technology,
  ORANG/Safdie Terminal: 27 x Imperial Slaves,
  KARID/Araki Port: 27 x Marine Equipment,
  HOLLOS/Pond Port: 27 x Imperial Slaves,
  HAYIMSHIS/Giancola Holdings: 27 x Beryllium,
  APURUI/Lange Gateway: 27 x Imperial Slaves,
  NAMON/Maanen Dock: 27 x Crop Harvesters,
  APURUI/Hereford City: 27 x Imperial Slaves,
  HIP 112049/Adams Vision: 27 x Beryllium,
  APURUI/Dugan Gateway: 27 x Imperial Slaves,
  ALPHA OCTANTIS/Swift Orbital: 27 x Beryllium,
  APURUI/Lyulka Hub: 27 x Imperial Slaves,
  QUIABLINJA/Vess Landing: 27 x Beryllium,
  APURUI/Marcy Gateway: 27 x Imperial Slaves,
  EBURNAKURA/Parkinson Terminal: 27 x Cobalt,
  ORANG/Qureshi Dock: 27 x Imperial Slaves,
  TIMBARICHS/Vaucouleurs Refinery: 27 x Indium,
  ORANG/Dilworth City: 27 x Imperial Slaves,
  SEGOVEDUWA/Dolgov Port: 27 x Progenitor Cells,
  ORANG/Argelander Vision: 27 x Imperial Slaves,
  SIGMA HYDRI/Damnclown's Funland: 27 x Crop Harvesters,
  ORANG/Bessel Gateway: 27 x Imperial Slaves,
  FAUST 68/Slipher Hub: 27 x Beryllium,
  LTT 9810/Trimble Vision: 27 x Imperial Slaves,
  BETA-1 TUCANAE/Adams Orbital: 27 x Resonating Separators,
  BPM 28514/Salam Survey: 27 x Beryllium,
  HERTHANS/Henry Vision: 27 x Imperial Slaves,
  AVALON/Akiyama Vision: 27 x Resonating Separators,
  HERENGUL/Shapley Horizons: 27 x Uraninite,
  ACHENAR/Wilson Vision: 27 x Gold,
  KAIAKUL/Bliss Gateway: 27 x Beryllium,
  URVANE/Lee Dock: 27 x Marine Equipment,
  MARRALLANG/Coggia Terminal: 27 x Imperial Slaves,
  NIFLHEL/Wisdom Plant: 27 x Superconductors,
  MARRALLANG/Stromgren Dock: 27 x Imperial Slaves,
  NIFLHEL/Biruni Port: 27 x Superconductors,
  MARRALLANG/Anderson Station: 27 x Imperial Slaves,
  CD-60 278/Chacornac's Progress: 27 x Superconductors,
  MARRALLANG/Alfven Hub: 27 x Imperial Slaves,
  CD-64 139/Christa Mcauliffe +5.803.812cr (1.791/ton)

real    78m47.533s
user    0m0.000s
sys     0m0.030s
 
Last edited:
Thanks gazelle, much appreciated.

And wow 78 minutes, that is pretty slow hehe. It would be much faster to do it like I described in my previous post, even with nuisance of editing and copy pasting the system names heh. But I'll definitely test how it runs with this code change, thanks again.
 
I don't have the newest computer ("only" 2.8GHz). A 30 hops run takes 15min. So 15*4 = 60 that leaves 18/3 = 6min for the c&p part per run. One might be faster than that but it's still user interaction which needs to be done. Without the interaction you could do other things while letting the computer do the (boring) calculation.
 
I tested it on my machine (heh cant remember the specs, too lazy to look them up), it was 35min for 120 hop route. Yeah its long, but its doable. Like you wake up in the morning, update Maddavo's database, then start 120 hop calculating and grab a breakfast in the mean time, when you're done you got fresh mega trade route waiting :)

Interesting thing is that when I did the _Dastardly_'s 60 hop route, it took me all day... so I wonder if such 120 mega route would take like three maybe even four days of relaxed playing.
 
Last edited:
Back
Top Bottom