EDCD / EDMarketConnector

Downloads commodity market and other station data from the game Elite: Dangerous for use with all popular online and offline trading tools.
GNU General Public License v2.0
991 stars 155 forks source link

Exceptions logged on startup and shutdown #2301

Open aussig opened 3 weeks ago

aussig commented 3 weeks ago

Please complete the following information:

EDMC Version:

OS Details:

Environment Details

Describe the bug

On starting up EDMC, am getting the following exception thrown in the EDMC log file:

Exception in thread DDE worker:
Traceback (most recent call last):
  File "threading.pyc", line 1045, in _bootstrap_inner
  File "threading.pyc", line 982, in run
  File "protocol.pyc", line 206, in worker
TypeError: Objects of type 'int' can not be converted to Unicode.

On shutting down EDMC, am getting two different exceptions thrown, both from built-in plugins, in both the main EDMC log and the debug log:

2024-09-28 07:30:41.406 UTC - ERROR - 61296:42352:42352 plug.notify_stop:273: Plugin "EDDN" failed
Traceback (most recent call last):
  File "plug.pyc", line 270, in notify_stop
  File "C:\Program Files (x86)\EDMarketConnector\plugins\eddn.py", line 2240, in plugin_stop
    this.eddn.close()
  File "C:\Program Files (x86)\EDMarketConnector\plugins\eddn.py", line 607, in close
    self.sender.close()
  File "C:\Program Files (x86)\EDMarketConnector\plugins\eddn.py", line 245, in close
    self.db.close()
sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 54412 and this is thread id 42352.

and

2024-09-28 07:30:41.408 UTC - ERROR - 61296:42352:42352 plug.notify_stop:273: Plugin "EDSM" failed
Traceback (most recent call last):
  File "plug.pyc", line 270, in notify_stop
  File "C:\Program Files (x86)\EDMarketConnector\plugins\edsm.py", line 264, in plugin_stop
    this.thread.join()  # type: ignore
    ^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'join'

To Reproduce Steps to reproduce the behavior:

  1. Launch EDMC
  2. Quit EDMC
  3. Examine log files

Expected behavior

No errors on startup or shutdown

Logs

EDMarketConnector-debug.log EDMarketConnector.log

aussig commented 3 weeks ago

Interesting information in the system profiler:

My actual O/S, from Windows System Profiler is:

Also, not too sure what's going on here:

Would you like me to raise a separate issue for that?

Syzuna commented 3 weeks ago

Win 11 being reported as Win 10 is nothing new. That is on Microsoft though.

The ValueErrors seem to be intended from what I saw in the code if the profiler can't find a log file to get the info from. See: https://github.com/EDCD/EDMarketConnector/blob/main/EDMCSystemProfiler.py#L53-L83

Rixxan commented 2 weeks ago

Issue with system profile identified and fix on the way in next release.

Rixxan commented 2 weeks ago

Issue with system profiler has been fixed in the latest beta release. This is on deck for attention right after.

aussig commented 2 weeks ago

I haven't seen any of these exceptions being logged in v5.12.1 since using it over the last day. I can't be certain they are fixed after such a short testing time of course, but suspect that something in the latest release (Pathlib related?) solved the problems.