eyeonus / Trade-Dangerous

Mozilla Public License 2.0
97 stars 31 forks source link

SQL errors on first launch #95

Closed phlnx closed 2 years ago

phlnx commented 2 years ago

System: WSL2 Ubuntu 20.04

I apt installed python, tk, python-tk, pip

Then pip install tradedangerous, it put "trade" in ~/.local/bin, launched the command, showed help screen regularly, all is well.

Launch first time, it spouts a bunch of errors like this:

WARNING: *** INTERNAL ERROR: NOT NULL constraint failed: RareItem.station_id
CSV File: /home/username/data/RareItem.csv:135
SQL Query: INSERT OR REPLACE INTO RareItem (station_id,category_id,name,cost,max_allocation,illegal,suppressed) VALUES((SELECT Station.station_id FROM Station INNER JOIN System USING(system_id) WHERE System.name = ? AND Station.name = ?),(SELECT Category.category_id FROM Category WHERE Category.name = ?),?,?,?,?,?)
Params: ['XIHE', 'Zhen Dock', 'Technology', 'Xihe Biomorphic Companions', '4482', '10', 'N', 'N']

After that I tried the command again, and it does not recognize the system name, which it should:

trade buy "Thermal Cooling Unit" --supply 2500 --near Alcor --ly 50 --limit 1 --pad-size L --no-planet --fc N --od N
/home/username/.local/bin/trade: ERROR: Unrecognized system: Alcor

Any help is welcome.

I also second the request of adding a --max-ls argument to limit the results according to the station distance from main star.

eyeonus commented 2 years ago

https://github.com/eyeonus/Trade-Dangerous/wiki/Setup-Guide#gettingstarted

phlnx commented 2 years ago

Much obliged, after all the downloads, it now works fine.

However, during the download, this message appeared:

WARNING: Problem with download:
URL: https://beta.coriolis.io/data/index.json
Error: HTTP Error 404: Not Found

I found out about the project from this page: https://pypi.org/project/tradedangerous/ I wonder if the short tutorial present in that page ought to include a small note regarding this first mandatory step.

At any rate, the issue can be closed. Thanks again.

eyeonus commented 2 years ago

Yeah, that's the site that we used to use to get up-to-date ship info from, but the coriolis people pulled it. We don't have a replacement for it, but it doesn't break anything, so I left it in to remind me we still need to find a replacement so I don't have to manually update the ship info whenever FD adds new ones.

eyeonus commented 2 years ago

I found out about the project from this page: https://pypi.org/project/tradedangerous/ I wonder if the short tutorial present in that page ought to include a small note regarding this first mandatory step.

Right at the bottom of the Project Description: "If you want to give Trade Dangerous a try, look no further than the Setup Guide and the User Guide."

phlnx commented 2 years ago

I stand corrected, thank you.