eyeonus / Trade-Dangerous

Mozilla Public License 2.0
97 stars 31 forks source link

ModuleNotFoundError: No module named MFD #92

Closed jarangmandi closed 3 years ago

jarangmandi commented 3 years ago

When specifying the "--x52-pro" switch on the "run" command, the following error is produced...

Traceback (most recent call last): File "d:\program files\python39\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "d:\program files\python39\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "D:\Program Files\Python39\scripts\trade.exe\__main__.py", line 7, in <module> File "d:\program files\python39\lib\site-packages\tradedangerous\trade.py", line 43, in main cli.main(sys.argv) File "d:\program files\python39\lib\site-packages\tradedangerous\cli.py", line 70, in main trade(argv) File "d:\program files\python39\lib\site-packages\tradedangerous\cli.py", line 125, in trade results = cmdenv.run(tdb) File "d:\program files\python39\lib\site-packages\tradedangerous\commands\commandenv.py", line 73, in run self.checkMFD() File "d:\program files\python39\lib\site-packages\tradedangerous\commands\commandenv.py", line 96, in checkMFD self.mfd = X52ProMFD() File "d:\program files\python39\lib\site-packages\tradedangerous\mfd\__init__.py", line 74, in __init__ from . saitek import directoutput, x52pro File "d:\program files\python39\lib\site-packages\tradedangerous\mfd\saitek\directoutput.py", line 65, in <module> from mfd import MissingDeviceError ModuleNotFoundError: No module named 'mfd'

It is quite possibly a PICNIC issue - I'm not overly familiar with Python.

Running tradedangerous version 10.10.0.

eyeonus commented 3 years ago

Firstly, do you /have/ an x52pro?

Secondly, are you on the current version of TD?

Thirdly, this might help #88

jarangmandi commented 3 years ago

Firstly - of course. I know I said it might be PICNIC, but I'm not that clueless. Secondly - I put the version of TD I was using in the report. GitHub reports 10.10.0 as the latest version, so assuming that's accurate, then yes. Thirdly - I don't think it will, but then I'll take a closer look later in the week.

eyeonus commented 3 years ago

Try replacing https://github.com/ChuChuCharlie/Trade-Dangerous/blob/4c4d8cdcd5494c962ee9d5d21a6b894f4838a8bb/tradedangerous/mfd/saitek/directoutput.py#L65 with from tradedangerous.mfd import MissingDeviceError

I do not have an x52pro, so I can not test.

jarangmandi commented 3 years ago

Hi,

That did the trick... I can confirm that it worked with my X52 Pro, although I needed a similar edit in line 18 of x52pro.py.

In case it's important, the X52 Pro software version I'm running is 8.0.213.0, and the driver version is 8.0.121.0 - both 64 bit on Windows 10.

Thanks a lot for your help.