mracko / MSFS-Landing-Inspector

Freeware Tool for Analyzing Landings in Microsoft Flight Simulator 2020
MIT License
85 stars 6 forks source link

Should SimConnect be in requirements.txt? #4

Open jpwoodbu opened 3 years ago

jpwoodbu commented 3 years ago

The instructions don't mention running pip install simconnect so I did not. But after otherwise following the instructions (I think) and running msfs_landing_inspector.py, I got an import error from SimConnectCust/RequestList.py line 1 when it tried to import objects from SimConnect.

I ran pip install simconnect and the error was resolved. Would it make sense to include SimConnect in requirements.txt as well as including installing it in the instructions (or pip install -r requirements.txt)?

This is the full error message:

Traceback (most recent call last):
 File "<redacted>\MSFS-Landing-Inspector-master\msfs_landing_inspector.py", line 2, in <module>
   from SimConnectCust import *
 File "<redacted>\MSFS-Landing-Inspector-master\SimConnectCust\__init__.py", line 2, in <module>
   from .RequestList import AircraftRequests, Request
 File "<redacted>\MSFS-Landing-Inspector-master\SimConnectCust\RequestList.py", line 1, in <module>
   from SimConnect import *
ModuleNotFoundError: No module named 'SimConnect'
mracko commented 3 years ago

Thanks for pointing that out. It's a bug in the RequestList.py file. Technically, you shouldn't need to install SimConnect because the Landing Inspector is using a slightly modified version of the original SimConnect library. Nevertheless, installing SimConnect just like you did will fix the issue for now.

I'll fix the issue later this week hopefully.