nmeier / simscript

Flight sim input/output automation via python scripts
MIT License
10 stars 3 forks source link

Cannot initialize DLL for FSX Simconnect #1

Open NoahDoah opened 7 years ago

NoahDoah commented 7 years ago

Hello, I am new to GitHub, so no Idea if I am right here.

I just got a question to your simscript. I downloaded the simconnect program from: https://github.com/nmeier/simscript/releases

When I create my own script in the scripts-Folder and I just do that:

import log log.info("Testing...")

Then I start simscript.exe and start my file with the menu of the traybar icon. Everything works fine then. It outputs "Testing..." all the time.

But when I make this:

import log, fsx log.info("Testing...")

It just says "Cannot initialize DLL for FSX SimConnect".

What do I wrong? Do I have to do something else or update anything?

I really hope this is the right place to write and you can answer me. Because this Library is SOOO awesome. Thank you so much. It ist indeed the easiest way to program FSX Things. I got a really nice Idea and hope you can answer me :)

With best regards, Noah

nmeier commented 7 years ago

Hi

I've changed fsx.py to pass the error up for logging. The problem most likely is

[Error 126] The specified module could not be found

Please rebase and try again to confirm to see if this is what you're seeing. the fsx module tries to load the FSX simconnect dll. It might not be accessible (and should work if the simconnect toolkit is installed).

Re-run the install of SimConnect. Also, if you've downloaded the 64bit version of simscript, or are running 64bit python yourself, you might want to try the 32bit version. I can't remember whether simconnect from a 64bit client is working atm.

N

NoahDoah commented 7 years ago

Thank you for your fast response.

I changed the file and tried again. You are right. I get 126 Error. Heres my log:

INFO:simscript:Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] WARNING:simscript:Couldn't initialize module fsx: Cannot initialize DLL for FSX SimConnect ([Error 126] Das angegebene Modul wurde nicht gefunden) WARNING:simscript:Couldn't initialize module fsxo: Cannot initialize DLL for FSX SimConnect INFO:joysticks:No Virtual Joystick Driver active INFO:STDOUT:Exception in thread Thread-1: WARNING:phidgets:Cannot initialize support for Phidgets ([Error 126] Das angegebene Modul wurde nicht gefunden) INFO:STDOUT:Traceback (most recent call last): INFO:STDOUT:Exception WindowsError: WindowsError(126, 'Das angegebene Modul wurde nicht gefunden') in <bound method Manager.del of <Phidgets.Manager.Manager instance at 0x0000000002AE9908>> ignored INFO:STDOUT: File "threading.pyc", line 551, in __bootstrap_inner INFO:STDOUT: File "modules\mouse.py", line 48, in run INFO:STDOUT:ArgumentError: argument 3: <type 'exceptions.OverflowError'>: long int too long to convert INFO:STDOUT: WARNING:test:Cannot initialize DLL for FSX SimConnect ([Error 126] Das angegebene Modul wurde nicht gefunden) INFO:simscript:Launching tail.exe "c:\users\fishbe~1\appdata\local\temp\simscript_exmayr.log" INFO:simscript:test executions took longer than sync frequency (964ms>50ms) INFO:simscript:test executions took longer than sync frequency (61ms>50ms) INFO:simscript:test executions took longer than sync frequency (63ms>50ms) INFO:simscript:test executions took longer than sync frequency (51ms>50ms) .....

When I start a sample program (Request Data) from the FSX SDK-Directory it all works well. It is connecting and showing infomation.

I will try to use Python 32Bit and SimScript 32Bit.