eyeonus / Trade-Dangerous

Mozilla Public License 2.0
95 stars 31 forks source link

no such table: Item (Ship?) on import with eddblink #183

Open feamsr00 opened 2 weeks ago

feamsr00 commented 2 weeks ago

Hey dudes. New user here.

Followed the https://github.com/eyeonus/Trade-Dangerous/wiki/Setup-Guide and did a pip install tradedangerous and Successfully installed appJar-0.94.0 ijson-3.3.0 markdown-it-py-3.0.0 mdurl-0.1.2 rich-13.7.1 tradedangerous-11.5.2. Continuing the follow the guide I then (curriously?) ran >trade import -P eddblink which then errored out.

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\__main__.py", line 7, in <module>
  File "C:\exec\ScoopApps\apps\python\current\Lib\site-packages\trade.py", line 41, in main
    cli.main(sys.argv)
  File "C:\exec\ScoopApps\apps\python\current\Lib\site-packages\tradedangerous\cli.py", line 66, in main
    trade(argv)
  File "C:\exec\ScoopApps\apps\python\current\Lib\site-packages\tradedangerous\cli.py", line 121, in trade
    results = cmdenv.run(tdb)
              ^^^^^^^^^^^^^^^
  File "C:\exec\ScoopApps\apps\python\current\Lib\site-packages\tradedangerous\commands\commandenv.py", line 81, in run
    self.tdb.getDB().execute(change)
sqlite3.OperationalError: no such table: Ship

I then reran it to get more debug info:

>trade import -P eddblink -wwwvvv
#cwd at launch was: C:\Users\feamsr00, changing to C:\exec\ScoopApps\persist\python\scripts to match trade.py
#Command line was: ['C:\\exec\\ScoopApps\\apps\\python\\current\\Scripts\\trade', 'import', '-P', 'eddblink', '-wwwvvv']
NOTE: Checking for update to 'System.csv'.
NOTE: Downloading file 'System.csv'.
NOTE: Requesting https://elite.tromador.com/files/System.csv
NOTE: Downloading   2.4MB gziped data
#{'Date': 'Fri, 05 Jul 2024 23:13:36 GMT', 'Server': 'Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.6.40 mod_perl/2.0.11 Perl/v5.16.3',
'Last-Modified': 'Sat, 29 Jun 2024 02:18:23 GMT', 'ETag': '"26f841-61bfdfa775505-gzip"', 'Accept-Ranges': 'bytes', 'Vary': 'Accept-Encoding,User-Agent',
'Content-Encoding': 'gzip', 'Keep-Alive': 'timeout=5, max=100', 'Connection': 'Keep-Alive', 'Transfer-Encoding': 'chunked', 'Content-Type': 'text/csv'}
⠇ System.csv ━━━━━━━━━━━━━━━━━━━━━━━━╺ 2495738/2553921 0:00:03#End of data
NOTE: Downloaded   2.4MB of gziped data   0.7MB/s
NOTE: Checking for update to 'Station.csv'.
NOTE: Downloading file 'Station.csv'.
NOTE: Requesting https://elite.tromador.com/files/Station.csv
NOTE: Downloading  29.2MB gziped data
#{'Date': 'Fri, 05 Jul 2024 23:13:45 GMT', 'Server': 'Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.6.40 mod_perl/2.0.11 Perl/v5.16.3',
'Last-Modified': 'Sat, 29 Jun 2024 02:18:22 GMT', 'ETag': '"1d2d10b-61bfdfa70f81c-gzip"', 'Accept-Ranges': 'bytes', 'Vary':
'Accept-Encoding,User-Agent', 'Content-Encoding': 'gzip', 'Keep-Alive': 'timeout=5, max=100', 'Connection': 'Keep-Alive', 'Transfer-Encoding':
'chunked', 'Content-Type': 'text/csv'}
⠦ Station.csv ━━━━━━━━━━━━━━━━━━━━━━━━╸ 30539956/30593291 0:01:38#End of data
NOTE: Downloaded  29.2MB of gziped data 302.0KB/s
NOTE: Checking for update to 'Item.csv'.
NOTE: Downloading file 'Item.csv'.
NOTE: Requesting https://elite.tromador.com/files/Item.csv
NOTE: Downloading  19.2KB gziped data
#{'Date': 'Fri, 05 Jul 2024 23:15:31 GMT', 'Server': 'Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.6.40 mod_perl/2.0.11 Perl/v5.16.3',
'Last-Modified': 'Sat, 29 Jun 2024 02:18:18 GMT', 'ETag': '"4caf-61bfdfa2e22b2-gzip"', 'Accept-Ranges': 'bytes', 'Vary': 'Accept-Encoding,User-Agent',
'Content-Encoding': 'gzip', 'Content-Length': '8135', 'Keep-Alive': 'timeout=5, max=100', 'Connection': 'Keep-Alive', 'Content-Type': 'text/csv'}
⠋ Working... ━━━━━━━━━━━━━━━━━━━━━━━━━     0/19631 0:00:00#End of data
NOTE: Downloaded  19.2KB of gziped data   1.0MB/s
NOTE: Checking for update to 'Category.csv'.
#'Category.csv': Dump is not more recent than Local.
#No .prices file to load
NOTE: Checking for update to 'listings.csv'.
NOTE: Downloading file 'listings.csv'.
NOTE: Requesting https://elite.tromador.com/files/listings.csv
NOTE: Downloading 244.9MB gziped data
#{'Date': 'Fri, 05 Jul 2024 23:15:35 GMT', 'Server': 'Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.6.40 mod_perl/2.0.11 Perl/v5.16.3',
'Last-Modified': 'Sat, 29 Jun 2024 02:20:48 GMT', 'ETag': '"f4e6c56-61bfe03287b14-gzip"', 'Accept-Ranges': 'bytes', 'Vary':
'Accept-Encoding,User-Agent', 'Content-Encoding': 'gzip', 'Keep-Alive': 'timeout=5, max=100', 'Connection': 'Keep-Alive', 'Transfer-Encoding':
'chunked', 'Content-Type': 'text/csv'}
⠼ listings.csv ━━━━━━━━━━━━━━━━━━━━━━━━╸ 256689909/256797782 0:10:50#End of data
NOTE: Downloaded 244.9MB of gziped data 385.3KB/s
NOTE: Checking listings
#Getting total number of entries in C:\Users\feamsr00\tmp\listings.csv...
NOTE: Processing market data from listings.csv: Start time = 2024-07-05 19:26:31.487318. Live = False
#Connecting to DB
#Getting list of commodities...
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ in _run_module_as_main:198                                                                       │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │   alter_argv = False                                                                         │ │
│ │         code = <code object <module> at 0x0000020C761216B0, file                             │ │
│ │                "C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\__main__.py", line   │ │
│ │                1>                                                                            │ │
│ │ main_globals = {                                                                             │ │
│ │                │   '__name__': '__main__',                                                   │ │
│ │                │   '__doc__': None,                                                          │ │
│ │                │   '__package__': '',                                                        │ │
│ │                │   '__loader__': <zipimporter object                                         │ │
│ │                "C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\">,                  │ │
│ │                │   '__spec__': ModuleSpec(name='__main__', loader=<zipimporter object        │ │
│ │                "C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\">,                  │ │
│ │                origin='C:\\exec\\ScoopApps\\apps\\python\\current\\Scripts\\trade.exe\\__ma… │ │
│ │                │   '__annotations__': {},                                                    │ │
│ │                │   '__builtins__': <module 'builtins' (built-in)>,                           │ │
│ │                │   '__file__':                                                               │ │
│ │                'C:\\exec\\ScoopApps\\apps\\python\\current\\Scripts\\trade.exe\\__main__.py… │ │
│ │                │   '__cached__':                                                             │ │
│ │                'C:\\exec\\ScoopApps\\apps\\python\\current\\Scripts\\trade.exe\\__pycache__… │ │
│ │                │   're': <module 're' from                                                   │ │
│ │                'C:\\exec\\ScoopApps\\apps\\python\\current\\Lib\\re\\__init__.py'>,          │ │
│ │                │   ... +2                                                                    │ │
│ │                }                                                                             │ │
│ │     mod_name = '__main__'                                                                    │ │
│ │     mod_spec = ModuleSpec(name='__main__', loader=<zipimporter object                        │ │
│ │                "C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\">,                  │ │
│ │                origin='C:\\exec\\ScoopApps\\apps\\python\\current\\Scripts\\trade.exe\\__ma… │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ in _run_code:88                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │       cached = 'C:\\exec\\ScoopApps\\apps\\python\\current\\Scripts\\trade.exe\\__pycache__… │ │
│ │         code = <code object <module> at 0x0000020C761216B0, file                             │ │
│ │                "C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\__main__.py", line   │ │
│ │                1>                                                                            │ │
│ │        fname = 'C:\\exec\\ScoopApps\\apps\\python\\current\\Scripts\\trade.exe\\__main__.py' │ │
│ │ init_globals = None                                                                          │ │
│ │       loader = <zipimporter object                                                           │ │
│ │                "C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\">                   │ │
│ │     mod_name = '__main__'                                                                    │ │
│ │     mod_spec = ModuleSpec(name='__main__', loader=<zipimporter object                        │ │
│ │                "C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\">,                  │ │
│ │                origin='C:\\exec\\ScoopApps\\apps\\python\\current\\Scripts\\trade.exe\\__ma… │ │
│ │     pkg_name = ''                                                                            │ │
│ │  run_globals = {                                                                             │ │
│ │                │   '__name__': '__main__',                                                   │ │
│ │                │   '__doc__': None,                                                          │ │
│ │                │   '__package__': '',                                                        │ │
│ │                │   '__loader__': <zipimporter object                                         │ │
│ │                "C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\">,                  │ │
│ │                │   '__spec__': ModuleSpec(name='__main__', loader=<zipimporter object        │ │
│ │                "C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\">,                  │ │
│ │                origin='C:\\exec\\ScoopApps\\apps\\python\\current\\Scripts\\trade.exe\\__ma… │ │
│ │                │   '__annotations__': {},                                                    │ │
│ │                │   '__builtins__': <module 'builtins' (built-in)>,                           │ │
│ │                │   '__file__':                                                               │ │
│ │                'C:\\exec\\ScoopApps\\apps\\python\\current\\Scripts\\trade.exe\\__main__.py… │ │
│ │                │   '__cached__':                                                             │ │
│ │                'C:\\exec\\ScoopApps\\apps\\python\\current\\Scripts\\trade.exe\\__pycache__… │ │
│ │                │   're': <module 're' from                                                   │ │
│ │                'C:\\exec\\ScoopApps\\apps\\python\\current\\Lib\\re\\__init__.py'>,          │ │
│ │                │   ... +2                                                                    │ │
│ │                }                                                                             │ │
│ │  script_name = None                                                                          │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ in <module>:7                                                                                    │
│                                                                                                  │
│ C:\exec\ScoopApps\apps\python\current\Lib\site-packages\trade.py:41 in main                      │
│                                                                                                  │
│   39                                                                                             │
│   40 def main(argv = None):                                                                      │
│ ❱ 41 │   cli.main(sys.argv)                                                                      │
│   42                                                                                             │
│   43 if __name__ == "__main__":                                                                  │
│                                                                                                  │
│ ╭── locals ───╮                                                                                  │
│ │ argv = None │                                                                                  │
│ ╰─────────────╯                                                                                  │
│                                                                                                  │
│ C:\exec\ScoopApps\apps\python\current\Lib\site-packages\tradedangerous\cli.py:66 in main         │
│                                                                                                  │
│    64 │   │   │   │   cProfile.run("trade(argv)")                                                │
│    65 │   │   │   else:                                                                          │
│ ❱  66 │   │   │   │   trade(argv)                                                                │
│    67 │   │   except PluginException as e:                                                       │
│    68 │   │   │   print("PLUGIN ERROR: {}".format(e))                                            │
│                                                                                                  │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮                     │
│ │ argv = [                                                                 │                     │
│ │        │   'C:\\exec\\ScoopApps\\apps\\python\\current\\Scripts\\trade', │                     │
│ │        │   'import',                                                     │                     │
│ │        │   '-P',                                                         │                     │
│ │        │   'eddblink',                                                   │                     │
│ │        │   '-wwwvvv'                                                     │                     │
│ │        ]                                                                 │                     │
│ ╰──────────────────────────────────────────────────────────────────────────╯                     │
│                                                                                                  │
│ C:\exec\ScoopApps\apps\python\current\Lib\site-packages\tradedangerous\cli.py:121 in trade       │
│                                                                                                  │
│   119 │                                                                                          │
│   120 │   try:                                                                                   │
│ ❱ 121 │   │   results = cmdenv.run(tdb)                                                          │
│   122 │   finally:                                                                               │
│   123 │   │   # always close tdb                                                                 │
│                                                                                                  │
│ ╭──────────────────────────────────────── locals ─────────────────────────────────────────╮      │
│ │     argv = [                                                                            │      │
│ │            │   'C:\\exec\\ScoopApps\\apps\\python\\current\\Scripts\\trade',            │      │
│ │            │   'import',                                                                │      │
│ │            │   '-P',                                                                    │      │
│ │            │   'eddblink',                                                              │      │
│ │            │   '-wwwvvv'                                                                │      │
│ │            ]                                                                            │      │
│ │   cmdenv = <tradedangerous.commands.commandenv.CommandEnv object at 0x0000020C7994E5D0> │      │
│ │ cmdIndex = <tradedangerous.commands.CommandIndex object at 0x0000020C76F5CAA0>          │      │
│ │      tdb = <tradedangerous.tradedb.TradeDB object at 0x0000020C771080B0>                │      │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────╯      │
│                                                                                                  │
│ C:\exec\ScoopApps\apps\python\current\Lib\site-packages\tradedangerous\commands\commandenv.py:95 │
│ in run                                                                                           │
│                                                                                                  │
│    93 │   │                                                                                      │
│    94 │   │   results = CommandResults(self)                                                     │
│ ❱  95 │   │   return self._cmd.run(results, self, tdb)                                           │
│    96 │                                                                                          │
│    97 │   def render(self, results):                                                             │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ db_change = WindowsPath('C:/exec/ScoopApps/persist/python/Lib/site-packages/tradedangerous/… │ │
│ │   results = <tradedangerous.commands.commandenv.CommandResults object at 0x0000020C79443FE0> │ │
│ │      self = <tradedangerous.commands.commandenv.CommandEnv object at 0x0000020C7994E5D0>     │ │
│ │       tdb = <tradedangerous.tradedb.TradeDB object at 0x0000020C771080B0>                    │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ C:\exec\ScoopApps\apps\python\current\Lib\site-packages\tradedangerous\commands\import_cmd.py:12 │
│ 4 in run                                                                                         │
│                                                                                                  │
│   122 │   │   # that needs doing and we can stop now.                                            │
│   123 │   │   # If it returns True, it is returning control to the module.                       │
│ ❱ 124 │   │   if not plugin.run():                                                               │
│   125 │   │   │   return None                                                                    │
│   126                                                                                            │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │      cmdenv = <tradedangerous.commands.commandenv.CommandEnv object at 0x0000020C7994E5D0>   │ │
│ │      plugin = <tradedangerous.plugins.eddblink_plug.ImportPlugin object at                   │ │
│ │               0x0000020C771BE600>                                                            │ │
│ │ pluginClass = <class 'tradedangerous.plugins.eddblink_plug.ImportPlugin'>                    │ │
│ │     results = <tradedangerous.commands.commandenv.CommandResults object at                   │ │
│ │               0x0000020C79443FE0>                                                            │ │
│ │         tdb = <tradedangerous.tradedb.TradeDB object at 0x0000020C771080B0>                  │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ C:\exec\ScoopApps\apps\python\current\Lib\site-packages\tradedangerous\plugins\eddblink_plug.py: │
│ 478 in run                                                                                       │
│                                                                                                  │
│   476 │   │   if self.getOption("listings"):                                                     │
│   477 │   │   │   if self.downloadFile(self.listingsPath) or self.getOption("force"):            │
│ ❱ 478 │   │   │   │   self.importListings(self.listingsPath)                                     │
│   479 │   │   │   if self.downloadFile(self.liveListingsPath) or self.getOption("force"):        │
│   480 │   │   │   │   self.importListings(self.liveListingsPath)                                 │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ buildCache = True                                                                            │ │
│ │    default = True                                                                            │ │
│ │       self = <tradedangerous.plugins.eddblink_plug.ImportPlugin object at                    │ │
│ │              0x0000020C771BE600>                                                             │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ C:\exec\ScoopApps\apps\python\current\Lib\site-packages\tradedangerous\plugins\eddblink_plug.py: │
│ 211 in importListings                                                                            │
│                                                                                                  │
│   209 │   │                                                                                      │
│   210 │   │   # Fetch all the items IDS                                                          │
│ ❱ 211 │   │   item_lookup = _make_item_id_lookup(self.tdenv, db.cursor())                        │
│   212 │   │   station_lookup = _make_station_id_lookup(self.tdenv, db.cursor())                  │
│   213 │   │   last_station_update_times = _collect_station_modified_times(self.tdenv, db.curso   │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │                   db = <sqlite3.Connection object at 0x0000020C78F387C0>                     │ │
│ │            from_live = False                                                                 │ │
│ │        listings_file = WindowsPath('listings.csv')                                           │ │
│ │        listings_path = WindowsPath('C:/Users/feamsr00/tmp/listings.csv')                     │ │
│ │                 self = <tradedangerous.plugins.eddblink_plug.ImportPlugin object at          │ │
│ │                        0x0000020C771BE600>                                                   │ │
│ │     stmt_add_listing = '\n            INSERT OR IGNORE INTO StationItem (\n                  │ │
│ │                        station_id, ite'+299                                                  │ │
│ │   stmt_flush_station = 'DELETE from StationItem WHERE station_id = ?'                        │ │
│ │ stmt_unliven_station = 'UPDATE StationItem SET from_live = 0 WHERE station_id = ?'           │ │
│ │                total = 4314474                                                               │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ C:\exec\ScoopApps\apps\python\current\Lib\site-packages\tradedangerous\plugins\eddblink_plug.py: │
│ 55 in _make_item_id_lookup                                                                       │
│                                                                                                  │
│    53 │   """ helper: retrieve the list of commodities in database. """                          │
│    54 │   tdenv.DEBUG0("Getting list of commodities...")                                         │
│ ❱  55 │   return frozenset(cols[0] for cols in db.execute("SELECT item_id FROM Item"))           │
│    56                                                                                            │
│    57                                                                                            │
│                                                                                                  │
│ ╭─────────────────────────────────────── locals ───────────────────────────────────────╮         │
│ │    db = <sqlite3.Cursor object at 0x0000020C7A3BEAC0>                                │         │
│ │ tdenv = <tradedangerous.commands.commandenv.CommandEnv object at 0x0000020C7994E5D0> │         │
│ ╰──────────────────────────────────────────────────────────────────────────────────────╯         │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
OperationalError: no such table: Item

I found it interesting the missing table changed from Ship to Item. It's consistently item now though

>python --version
Python 3.12.4 

I welcome your thoughts.

eyeonus commented 2 weeks ago

Unfortunately I am not currently able to spend any time on TD, so I can't investigate the problem. Please try running trade import -P eddblink -O force,all You can also try trade import -P eddblink -O clean If neither work, as a last resort you can remove the data folder and create an initial TD DB using trade import -P spansh -O maxage=30, and then using the regular eddblink import afterwards.

On Fri, Jul 5, 2024, 18:26 Chris @.***> wrote:

Hey dudes. New user here.

Followed the https://github.com/eyeonus/Trade-Dangerous/wiki/Setup-Guide and did a pip install tradedangerous and Successfully installed appJar-0.94.0 ijson-3.3.0 markdown-it-py-3.0.0 mdurl-0.1.2 rich-13.7.1 tradedangerous-11.5.2. Continuing the follow the guide I then (curriously?) ran >trade import -P eddblink which then errored out.

Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe__main__.py", line 7, in File "C:\exec\ScoopApps\apps\python\current\Lib\site-packages\trade.py", line 41, in main cli.main(sys.argv) File "C:\exec\ScoopApps\apps\python\current\Lib\site-packages\tradedangerous\cli.py", line 66, in main trade(argv) File "C:\exec\ScoopApps\apps\python\current\Lib\site-packages\tradedangerous\cli.py", line 121, in trade results = cmdenv.run(tdb) ^^^^^^^^^^^^^^^ File "C:\exec\ScoopApps\apps\python\current\Lib\site-packages\tradedangerous\commands\commandenv.py", line 81, in run self.tdb.getDB().execute(change) sqlite3.OperationalError: no such table: Ship

I then reran it to get more debug info:

trade import -P eddblink -wwwvvv

cwd at launch was: C:\Users\feamsr00, changing to C:\exec\ScoopApps\persist\python\scripts to match trade.py

Command line was: ['C:\exec\ScoopApps\apps\python\current\Scripts\trade', 'import', '-P', 'eddblink', '-wwwvvv']

NOTE: Checking for update to 'System.csv'. NOTE: Downloading file 'System.csv'. NOTE: Requesting https://elite.tromador.com/files/System.csv NOTE: Downloading 2.4MB gziped data

{'Date': 'Fri, 05 Jul 2024 23:13:36 GMT', 'Server': 'Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.6.40 mod_perl/2.0.11 Perl/v5.16.3',

'Last-Modified': 'Sat, 29 Jun 2024 02:18:23 GMT', 'ETag': '"26f841-61bfdfa775505-gzip"', 'Accept-Ranges': 'bytes', 'Vary': 'Accept-Encoding,User-Agent', 'Content-Encoding': 'gzip', 'Keep-Alive': 'timeout=5, max=100', 'Connection': 'Keep-Alive', 'Transfer-Encoding': 'chunked', 'Content-Type': 'text/csv'} ⠇ System.csv ━━━━━━━━━━━━━━━━━━━━━━━━╺ 2495738/2553921 0:00:03#End of data NOTE: Downloaded 2.4MB of gziped data 0.7MB/s NOTE: Checking for update to 'Station.csv'. NOTE: Downloading file 'Station.csv'. NOTE: Requesting https://elite.tromador.com/files/Station.csv NOTE: Downloading 29.2MB gziped data

{'Date': 'Fri, 05 Jul 2024 23:13:45 GMT', 'Server': 'Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.6.40 mod_perl/2.0.11 Perl/v5.16.3',

'Last-Modified': 'Sat, 29 Jun 2024 02:18:22 GMT', 'ETag': '"1d2d10b-61bfdfa70f81c-gzip"', 'Accept-Ranges': 'bytes', 'Vary': 'Accept-Encoding,User-Agent', 'Content-Encoding': 'gzip', 'Keep-Alive': 'timeout=5, max=100', 'Connection': 'Keep-Alive', 'Transfer-Encoding': 'chunked', 'Content-Type': 'text/csv'} ⠦ Station.csv ━━━━━━━━━━━━━━━━━━━━━━━━╸ 30539956/30593291 0:01:38#End of data NOTE: Downloaded 29.2MB of gziped data 302.0KB/s NOTE: Checking for update to 'Item.csv'. NOTE: Downloading file 'Item.csv'. NOTE: Requesting https://elite.tromador.com/files/Item.csv NOTE: Downloading 19.2KB gziped data

{'Date': 'Fri, 05 Jul 2024 23:15:31 GMT', 'Server': 'Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.6.40 mod_perl/2.0.11 Perl/v5.16.3',

'Last-Modified': 'Sat, 29 Jun 2024 02:18:18 GMT', 'ETag': '"4caf-61bfdfa2e22b2-gzip"', 'Accept-Ranges': 'bytes', 'Vary': 'Accept-Encoding,User-Agent', 'Content-Encoding': 'gzip', 'Content-Length': '8135', 'Keep-Alive': 'timeout=5, max=100', 'Connection': 'Keep-Alive', 'Content-Type': 'text/csv'} ⠋ Working... ━━━━━━━━━━━━━━━━━━━━━━━━━ 0/19631 0:00:00#End of data NOTE: Downloaded 19.2KB of gziped data 1.0MB/s NOTE: Checking for update to 'Category.csv'.

'Category.csv': Dump is not more recent than Local.

No .prices file to load

NOTE: Checking for update to 'listings.csv'. NOTE: Downloading file 'listings.csv'. NOTE: Requesting https://elite.tromador.com/files/listings.csv NOTE: Downloading 244.9MB gziped data

{'Date': 'Fri, 05 Jul 2024 23:15:35 GMT', 'Server': 'Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.6.40 mod_perl/2.0.11 Perl/v5.16.3',

'Last-Modified': 'Sat, 29 Jun 2024 02:20:48 GMT', 'ETag': '"f4e6c56-61bfe03287b14-gzip"', 'Accept-Ranges': 'bytes', 'Vary': 'Accept-Encoding,User-Agent', 'Content-Encoding': 'gzip', 'Keep-Alive': 'timeout=5, max=100', 'Connection': 'Keep-Alive', 'Transfer-Encoding': 'chunked', 'Content-Type': 'text/csv'} ⠼ listings.csv ━━━━━━━━━━━━━━━━━━━━━━━━╸ 256689909/256797782 0:10:50#End of data NOTE: Downloaded 244.9MB of gziped data 385.3KB/s NOTE: Checking listings

Getting total number of entries in C:\Users\feamsr00\tmp\listings.csv...

NOTE: Processing market data from listings.csv: Start time = 2024-07-05 19:26:31.487318. Live = False

Connecting to DB

Getting list of commodities...

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ in _run_module_as_main:198 │ │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ │ │ alter_argv = False │ │ │ │ code = <code object at 0x0000020C761216B0, file │ │ │ │ "C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe__main.py", line │ │ │ │ 1> │ │ │ │ main_globals = { │ │ │ │ │ 'name': 'main', │ │ │ │ │ 'doc': None, │ │ │ │ │ 'package': '', │ │ │ │ │ 'loader': <zipimporter object │ │ │ │ "C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\">, │ │ │ │ │ 'spec': ModuleSpec(name='main', loader=<zipimporter object │ │ │ │ "C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\">, │ │ │ │ origin='C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\ma… │ │ │ │ │ 'annotations': {}, │ │ │ │ │ 'builtins': <module 'builtins' (built-in)>, │ │ │ │ │ 'file': │ │ │ │ 'C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\main.py… │ │ │ │ │ 'cached': │ │ │ │ 'C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\pycache… │ │ │ │ │ 're': <module 're' from │ │ │ │ 'C:\exec\ScoopApps\apps\python\current\Lib\re\init__.py'>, │ │ │ │ │ ... +2 │ │ │ │ } │ │ │ │ mod_name = 'main' │ │ │ │ mod_spec = ModuleSpec(name='main', loader=<zipimporter object │ │ │ │ "C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\">, │ │ │ │ origin='C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\ma… │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ │ in _run_code:88 │ │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ │ │ cached = 'C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\pycache… │ │ │ │ code = <code object at 0x0000020C761216B0, file │ │ │ │ "C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\main.py", line │ │ │ │ 1> │ │ │ │ fname = 'C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\main.py' │ │ │ │ init_globals = None │ │ │ │ loader = <zipimporter object │ │ │ │ "C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\"> │ │ │ │ mod_name = 'main__' │ │ │ │ mod_spec = ModuleSpec(name='main', loader=<zipimporter object │ │ │ │ "C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\">, │ │ │ │ origin='C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\ma… │ │ │ │ pkg_name = '' │ │ │ │ run_globals = { │ │ │ │ │ 'name': 'main', │ │ │ │ │ 'doc': None, │ │ │ │ │ 'package': '', │ │ │ │ │ 'loader': <zipimporter object │ │ │ │ "C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\">, │ │ │ │ │ 'spec': ModuleSpec(name='main', loader=<zipimporter object │ │ │ │ "C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\">, │ │ │ │ origin='C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\ma… │ │ │ │ │ 'annotations': {}, │ │ │ │ │ 'builtins': <module 'builtins' (built-in)>, │ │ │ │ │ 'file': │ │ │ │ 'C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\main.py… │ │ │ │ │ 'cached': │ │ │ │ 'C:\exec\ScoopApps\apps\python\current\Scripts\trade.exe\pycache… │ │ │ │ │ 're': <module 're' from │ │ │ │ 'C:\exec\ScoopApps\apps\python\current\Lib\re\init.py'>, │ │ │ │ │ ... +2 │ │ │ │ } │ │ │ │ script_name = None │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ in :7 │ │ │ │ C:\exec\ScoopApps\apps\python\current\Lib\site-packages\trade.py:41 in main │ │ │ │ 39 │ │ 40 def main(argv = None): │ │ ❱ 41 │ cli.main(sys.argv) │ │ 42 │ │ 43 if name == "main__": │ │ │ │ ╭── locals ───╮ │ │ │ argv = None │ │ │ ╰─────────────╯ │ │ │ │ C:\exec\ScoopApps\apps\python\current\Lib\site-packages\tradedangerous\cli.py:66 in main │ │ │ │ 64 │ │ │ │ cProfile.run("trade(argv)") │ │ 65 │ │ │ else: │ │ ❱ 66 │ │ │ │ trade(argv) │ │ 67 │ │ except PluginException as e: │ │ 68 │ │ │ print("PLUGIN ERROR: {}".format(e)) │ │ │ │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │ │ │ argv = [ │ │ │ │ │ 'C:\exec\ScoopApps\apps\python\current\Scripts\trade', │ │ │ │ │ 'import', │ │ │ │ │ '-P', │ │ │ │ │ 'eddblink', │ │ │ │ │ '-wwwvvv' │ │ │ │ ] │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ │ │ │ C:\exec\ScoopApps\apps\python\current\Lib\site-packages\tradedangerous\cli.py:121 in trade │ │ │ │ 119 │ │ │ 120 │ try: │ │ ❱ 121 │ │ results = cmdenv.run(tdb) │ │ 122 │ finally: │ │ 123 │ │ # always close tdb │ │ │ │ ╭──────────────────────────────────────── locals ─────────────────────────────────────────╮ │ │ │ argv = [ │ │ │ │ │ 'C:\exec\ScoopApps\apps\python\current\Scripts\trade', │ │ │ │ │ 'import', │ │ │ │ │ '-P', │ │ │ │ │ 'eddblink', │ │ │ │ │ '-wwwvvv' │ │ │ │ ] │ │ │ │ cmdenv = <tradedangerous.commands.commandenv.CommandEnv object at 0x0000020C7994E5D0> │ │ │ │ cmdIndex = <tradedangerous.commands.CommandIndex object at 0x0000020C76F5CAA0> │ │ │ │ tdb = <tradedangerous.tradedb.TradeDB object at 0x0000020C771080B0> │ │ │ ╰─────────────────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ C:\exec\ScoopApps\apps\python\current\Lib\site-packages\tradedangerous\commands\commandenv.py:95 │ │ in run │ │ │ │ 93 │ │ │ │ 94 │ │ results = CommandResults(self) │ │ ❱ 95 │ │ return self._cmd.run(results, self, tdb) │ │ 96 │ │ │ 97 │ def render(self, results): │ │ │ │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ │ │ db_change = WindowsPath('C:/exec/ScoopApps/persist/python/Lib/site-packages/tradedangerous/… │ │ │ │ results = <tradedangerous.commands.commandenv.CommandResults object at 0x0000020C79443FE0> │ │ │ │ self = <tradedangerous.commands.commandenv.CommandEnv object at 0x0000020C7994E5D0> │ │ │ │ tdb = <tradedangerous.tradedb.TradeDB object at 0x0000020C771080B0> │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ C:\exec\ScoopApps\apps\python\current\Lib\site-packages\tradedangerous\commands\import_cmd.py:12 │ │ 4 in run │ │ │ │ 122 │ │ # that needs doing and we can stop now. │ │ 123 │ │ # If it returns True, it is returning control to the module. │ │ ❱ 124 │ │ if not plugin.run(): │ │ 125 │ │ │ return None │ │ 126 │ │ │ │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ │ │ cmdenv = <tradedangerous.commands.commandenv.CommandEnv object at 0x0000020C7994E5D0> │ │ │ │ plugin = <tradedangerous.plugins.eddblink_plug.ImportPlugin object at │ │ │ │ 0x0000020C771BE600> │ │ │ │ pluginClass = <class 'tradedangerous.plugins.eddblink_plug.ImportPlugin'> │ │ │ │ results = <tradedangerous.commands.commandenv.CommandResults object at │ │ │ │ 0x0000020C79443FE0> │ │ │ │ tdb = <tradedangerous.tradedb.TradeDB object at 0x0000020C771080B0> │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ C:\exec\ScoopApps\apps\python\current\Lib\site-packages\tradedangerous\plugins\eddblink_plug.py: │ │ 478 in run │ │ │ │ 476 │ │ if self.getOption("listings"): │ │ 477 │ │ │ if self.downloadFile(self.listingsPath) or self.getOption("force"): │ │ ❱ 478 │ │ │ │ self.importListings(self.listingsPath) │ │ 479 │ │ │ if self.downloadFile(self.liveListingsPath) or self.getOption("force"): │ │ 480 │ │ │ │ self.importListings(self.liveListingsPath) │ │ │ │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ │ │ buildCache = True │ │ │ │ default = True │ │ │ │ self = <tradedangerous.plugins.eddblink_plug.ImportPlugin object at │ │ │ │ 0x0000020C771BE600> │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ C:\exec\ScoopApps\apps\python\current\Lib\site-packages\tradedangerous\plugins\eddblink_plug.py: │ │ 211 in importListings │ │ │ │ 209 │ │ │ │ 210 │ │ # Fetch all the items IDS │ │ ❱ 211 │ │ item_lookup = _make_item_id_lookup(self.tdenv, db.cursor()) │ │ 212 │ │ station_lookup = _make_station_id_lookup(self.tdenv, db.cursor()) │ │ 213 │ │ last_station_update_times = _collect_station_modified_times(self.tdenv, db.curso │ │ │ │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ │ │ db = <sqlite3.Connection object at 0x0000020C78F387C0> │ │ │ │ from_live = False │ │ │ │ listings_file = WindowsPath('listings.csv') │ │ │ │ listings_path = WindowsPath('C:/Users/feamsr00/tmp/listings.csv') │ │ │ │ self = <tradedangerous.plugins.eddblink_plug.ImportPlugin object at │ │ │ │ 0x0000020C771BE600> │ │ │ │ stmt_add_listing = '\n INSERT OR IGNORE INTO StationItem (\n │ │ │ │ station_id, ite'+299 │ │ │ │ stmt_flush_station = 'DELETE from StationItem WHERE station_id = ?' │ │ │ │ stmt_unliven_station = 'UPDATE StationItem SET from_live = 0 WHERE station_id = ?' │ │ │ │ total = 4314474 │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ C:\exec\ScoopApps\apps\python\current\Lib\site-packages\tradedangerous\plugins\eddblink_plug.py: │ │ 55 in _make_item_id_lookup │ │ │ │ 53 │ """ helper: retrieve the list of commodities in database. """ │ │ 54 │ tdenv.DEBUG0("Getting list of commodities...") │ │ ❱ 55 │ return frozenset(cols[0] for cols in db.execute("SELECT item_id FROM Item")) │ │ 56 │ │ 57 │ │ │ │ ╭─────────────────────────────────────── locals ───────────────────────────────────────╮ │ │ │ db = <sqlite3.Cursor object at 0x0000020C7A3BEAC0> │ │ │ │ tdenv = <tradedangerous.commands.commandenv.CommandEnv object at 0x0000020C7994E5D0> │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────╯ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ OperationalError: no such table: Item

I found it interesting the missing table changed from Ship to Item. It's consistently item now though

python --version Python 3.12.4

I welcome your thoughts.

— Reply to this email directly, view it on GitHub https://github.com/eyeonus/Trade-Dangerous/issues/183, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANHHYAVJFSGJ5PWEYQGKFTZK42SNAVCNFSM6AAAAABKN5CXD2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGM4TGMRWGI4DMMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>