Release Trade Dangerous (Est. 2015) Power user's highly configurable trade optimizer

Just had an error with TD:

Code:
Command: nav --ly-per=32.0 Tabit/Haber City Ceos/Babbage Gateway --pad=M --planetary=N -vvv


Traceback (most recent call last):
  File "/usr/local/bin/trade", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/tradedangerous/trade.py", line 40, in main
    cli.main(sys.argv)
  File "/usr/local/lib/python3.7/site-packages/tradedangerous/cli.py", line 70, in main
    trade(argv)
  File "/usr/local/lib/python3.7/site-packages/tradedangerous/cli.py", line 125, in trade
    results = cmdenv.run(tdb)
  File "/usr/local/lib/python3.7/site-packages/tradedangerous/commands/commandenv.py", line 83, in run
    return self._cmd.run(results, self, tdb)
  File "/usr/local/lib/python3.7/site-packages/tradedangerous/commands/nav_cmd.py", line 94, in run
    stationInterval=stationInterval,
TypeError: 'NoneType' object is not iterable

MacOS 10.13.6, python 3.7, latest TD. Is it me?
 
Just had an error with TD:

Code:
Command: nav --ly-per=32.0 Tabit/Haber City Ceos/Babbage Gateway --pad=M --planetary=N -vvv


Traceback (most recent call last):
  File "/usr/local/bin/trade", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/tradedangerous/trade.py", line 40, in main
    cli.main(sys.argv)
  File "/usr/local/lib/python3.7/site-packages/tradedangerous/cli.py", line 70, in main
    trade(argv)
  File "/usr/local/lib/python3.7/site-packages/tradedangerous/cli.py", line 125, in trade
    results = cmdenv.run(tdb)
  File "/usr/local/lib/python3.7/site-packages/tradedangerous/commands/commandenv.py", line 83, in run
    return self._cmd.run(results, self, tdb)
  File "/usr/local/lib/python3.7/site-packages/tradedangerous/commands/nav_cmd.py", line 94, in run
    stationInterval=stationInterval,
TypeError: 'NoneType' object is not iterable

MacOS 10.13.6, python 3.7, latest TD. Is it me?

It's not just you. I've fixed it, pushing the update now. TD v10.13.7 is now available.

Note: your command as shown above will still give an error with the fix:
Code:
...\Trade-Dangerous\test>..\trade.py nav --ly-per=32.0 "Tabit/Haber City" "Ceos/Babbage Gateway" --pad=M --planetary=N -vvv
H:\eyeonus\eclipse\workspace\Trade-Dangerous\trade.py: No route found between Tabit and Ceos with a max 32.0ly/jump limit.


Does TD have an ignore carrier flag? If not, please can we have one :)
Yes. "--fleet-carrier", "--fc". Options are any of [YN?] just like with --planetary.
 
Last edited:
It's not just you. I've fixed it, pushing the update now. TD v10.13.7 is now available.

Note: your command as shown above will still give an error with the fix:
Code:
...\Trade-Dangerous\test>..\trade.py nav --ly-per=32.0 "Tabit/Haber City" "Ceos/Babbage Gateway" --pad=M --planetary=N -vvv
H:\eyeonus\eclipse\workspace\Trade-Dangerous\trade.py: No route found between Tabit and Ceos with a max 32.0ly/jump limit.



Yes. "--fleet-carrier", "--fc". Options are any of [YN?] just like with --planetary.
Many thanks.
 
It's not just you. I've fixed it, pushing the update now. TD v10.13.7 is now available.

Note: your command as shown above will still give an error with the fix:
Code:
...\Trade-Dangerous\test>..\trade.py nav --ly-per=32.0 "Tabit/Haber City" "Ceos/Babbage Gateway" --pad=M --planetary=N -vvv
H:\eyeonus\eclipse\workspace\Trade-Dangerous\trade.py: No route found between Tabit and Ceos with a max 32.0ly/jump limit.



Yes. "--fleet-carrier", "--fc". Options are any of [YN?] just like with --planetary.
Just tried the fleet carrier flag and I'm seeing something strange.

With the flag missing entirely I get a trade to a carrier, with the flag set to 'N' I also get a trade, albeit a different one.

However, if I set the flag to either 'Y' or '?' I get a message stating that there are no routes in-range of any end station at the end of hop 0.

The full command is:

trade run --age=3 --avoid=slaves,narcotics --jumps=1 --lsp=12.5 --margin=0.0 --ls-max=500 --planetary=N --fleet-carrier=N --supply=100 --loop --insurance=4178077 -vvv --progress --summary --cr=14633779956 --cap=752 --ly=18.68 --empty=32.59 --pad=L

I had to type that manually, so I hope I got it all correct.
 
Just tried the fleet carrier flag and I'm seeing something strange.

With the flag missing entirely I get a trade to a carrier, with the flag set to 'N' I also get a trade, albeit a different one.

However, if I set the flag to either 'Y' or '?' I get a message stating that there are no routes in-range of any end station at the end of hop 0.

The full command is:

trade run --age=3 --avoid=slaves,narcotics --jumps=1 --lsp=12.5 --margin=0.0 --ls-max=500 --planetary=N --fleet-carrier=N --supply=100 --loop --insurance=4178077 -vvv --progress --summary --cr=14633779956 --cap=752 --ly=18.68 --empty=32.59 --pad=L

I had to type that manually, so I hope I got it all correct.
Oh, that's easy enough to explain.

'--fc Y' means only include stations which are fleet carriers: if the station is not a fleet carrier, it is excluded from the search
'--fc ?' means only include stations for which it is unknown whether or not they are fleet carriers: if the fleet carrier status is known, the station is excluded from the search.

'--fc YN' means include stations which are fleet carriers, and stations which aren't, but don't include any where it isn't known.
'--fc N?' means include stations that aren't, or that aren't known, but don't include any that are, fleet carriers.
'--fc YN?' is the same thing as not using the switch at all: all stations are included regardless of fleet carrier status.

The --planetary and --odyssey switches also work like the above, but with stations of those respective types rather than with fleet carriers.
 
Last edited:
Oh, that's easy enough to explain.

'--fc Y' means only include stations which are fleet carriers: if the station is not a fleet carrier, it is excluded from the search
'--fc ?' means only include stations for which it is unknown whether or not they are fleet carriers: if the fleet carrier status is known, the station is excluded from the search.

'--fc YN' means include stations which are fleet carriers, and stations which aren't, but don't include any where it isn't known.
'--fc N?' means include stations that aren't, or that aren't known, but don't include any that are, fleet carriers.
'--fc YN?' is the same thing as not using the switch at all: all stations are included regardless of fleet carrier status.

The --planetary and --odyssey switches also work like the above, but with stations of those respective types rather than with fleet carriers.
Great. Thanks.
 
To celebrate finally paying off the mortgage I treated myself to a new PC, one that exceeded the recommended specification for Elite and retired the old PC that was barely able to run ED. It is, after all, 8 years old now. This new PC came with Windows 11 and that seems to be giving me problems with Trade Dangerous. To wit, when first running TD, either in a command window, via batch file or by TDHelper, nothing happens. My normal practise is to run a database update first thing and TD just sits there and does nothing at all. The same is true for any of the various TD options. Just nothing.

I can see python running in the task manager, albeit with 0.0% CPU usage and the same for trade.exe. I left it like this for nearly an hour once just to see if I was being too hasty.

If I end the python and trade tasks and try again a few time I can eventually get it to run and after that, the response is very good.

This is definitely a Windows problem since if I run TD on my Mac it responds in seconds.

I've not been able to figure this one out. Any suggestions?
 
No, but you might be able to get help if you try asking around the Python and/or Win11 communities, as this seems like a general Python/Win11 thing, and not specific to TD.
 
No, but you might be able to get help if you try asking around the Python and/or Win11 communities, as this seems like a general Python/Win11 thing, and not specific to TD.
I have found a way to avoid the situation. If I turn on the PC and then leave it alone for an hour or so, then TD works as expected. I'll try reducing the time until the problem resurfaces and then use that as the time the PC needs to sit before using TD.

My guess is that although Windows 11 appears to start up very quickly, behind the scenes, so to speak, it takes a lot longer to get properly started and trying to use TD during this period has problems.

We'll see.
 
I have found a way to avoid the situation. If I turn on the PC and then leave it alone for an hour or so, then TD works as expected. I'll try reducing the time until the problem resurfaces and then use that as the time the PC needs to sit before using TD.

My guess is that although Windows 11 appears to start up very quickly, behind the scenes, so to speak, it takes a lot longer to get properly started and trying to use TD during this period has problems.

We'll see.
I wish this would work for me -- I'm missing using TD -- I still get the certificate messages when I try to update.
 
I wish this would work for me -- I'm missing using TD -- I still get the certificate messages when I try to update.
Have you tried the possible solutions found in these two posts?


The first one instructs python to use the Windows certificate store and the second, more complicated method tries to stop the error by Importing 3 certificates into your local Trusted Root Certification Authorities list.

These are mutually exclusive so don't try doing both at the same time.

Personally, I'd try the first one and if that fails, use the "pip uninstall python-certifi-win32" to revert the change and then try the second method.
 
Have you tried the possible solutions found in these two posts?


The first one instructs python to use the Windows certificate store and the second, more complicated method tries to stop the error by Importing 3 certificates into your local Trusted Root Certification Authorities list.

These are mutually exclusive so don't try doing both at the same time.

Personally, I'd try the first one and if that fails, use the "pip uninstall python-certifi-win32" to revert the change and then try the second method.
Hi Mark, Thanks very much for your help it's greatly appreciated. I might be doing a windows reinstall soon, as I'm upgrading my computer. It has been suggested that the current installation might be the source of the problem. I will keep this thread updated in case it's of use to anyone else. Thanks again
 
Another quick update:
You may have noticed TD fallen over again. After we finished our testing for the problem, I did a full reinstall to clean up all the test code and get a clean install of TD on the server. Sadly, it looks like the fix had not propagated to the local github mirror and my server downloaded the old broken version.

I've once again updated the server and manually checked we have the correct code, which we do, so إِنْ شَاءَ ٱللَّٰهُ this won't be a problem again.
Has the server fallen over again? My TD stopped updating earlier this afternoon.
 
Just for information. You might remember me as the person who was having real difficulties with the certification. I just did a bit of an upgrade to my PC and reinstalled windows. I did a standard install. I have downloaded Python, TD and the helper and as far as I can see it's all working as I think it should be.
Thanks to everyone for the help in the past 👍
 
I've given the server DB a big clearout. The listings-live.csv will now be a sensible size, much smaller than the main listings file which will make updates through the day miles quicker than they have been.
 
Hi Tromador - a wee glitch has popped up when trying to do a database update. This is what I get.

Command line: import -P eddblink -O listings
NOTE: Checking for update to 'systems_populated.jsonl'.
WARNING: Problem with download:
URL: https://elite.tromador.com/files/systems_populated.jsonl
Error: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)>
NOTE: Checking for update to 'stations.jsonl'.
NOTE: Checking for update to 'commodities.json'.
NOTE: Checking for update to 'listings.csv'.
NOTE: Import completed.

Getting the systems_populated.jsonl isnt too much of a problem as it downloads ok using the fallback option, but there doesn't seem to be a way of getting listings-live.csv to download. Each time, the import command shows Import Completed before getting to the listings-live download. Looking at your elite.tromador.com page shows all the files are there and being available for download as normal, but it just isn't happening. Any ideas spring to mind?
 
Back
Top Bottom