Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find module 'TcAdsDll' with python 3.8.0 #105

Open
yannickasselin opened this issue Nov 22, 2019 · 3 comments
Open

Could not find module 'TcAdsDll' with python 3.8.0 #105

yannickasselin opened this issue Nov 22, 2019 · 3 comments
Assignees
Labels

Comments

@yannickasselin
Copy link

@yannickasselin yannickasselin commented Nov 22, 2019

Hi,
Running pyads in python 3.7.5 works fine but when trying to import pyads in python 3.8.0 I get this error:

FileNotFoundError: Could not find module 'TcAdsDll'. Try using the full path with constructor syntax.

@klauer

This comment has been minimized.

Copy link
Contributor

@klauer klauer commented Nov 22, 2019

Python 3.8 changed how Windows DLL paths work with ctypes, only loading from trusted locations.

See:
https://docs.python.org/3/whatsnew/3.8.html#ctypes
https://docs.python.org/3/whatsnew/3.8.html#changes-in-the-python-api (search for DLL)

@yannickasselin

This comment has been minimized.

Copy link
Author

@yannickasselin yannickasselin commented Nov 22, 2019

I'm sorry. I'm really just a beginner. What do I need to do to make it work?

@stlehmann

This comment has been minimized.

Copy link
Owner

@stlehmann stlehmann commented Nov 23, 2019

OK, seems we need to use add_dll_directory here to allow loading the DLL from working directory.

@stlehmann stlehmann pinned this issue Nov 23, 2019
@stlehmann stlehmann self-assigned this Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.