Load DLL raises an error - 'WinError 126' in PyCharm version 2019.1.2.

Answered

Hello

In 2018 version, this line works:

dll_hnd = cdll.LoadLibrary('dll_name.dll')

After updating to 2019.1.2 this line raises an error: '[WinError 126] The specified module could not be found'

Running the program from command line - 'python app_name' works.

How can i fix it?

 

Thanks

 

 

 

3 comments
Comment actions Permalink

Hi, this is a known issue with the working directory handling https://youtrack.jetbrains.com/issue/PY-34978 The only workaround at the moment is to use an absolute path to the dll.

0
Comment actions Permalink

Hello

Adding absolute path did not help...

Do you have estimation for this bug to be fixed?

 

Thanks

 

0
Comment actions Permalink

> Do you have estimation for this bug to be fixed?

Unfortunately not yet, will ping the dev team about it. I am sorry for the inconvenience.

0

Please sign in to leave a comment.