-
Notifications
You must be signed in to change notification settings - Fork 12
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
Can't Import _tds when calling import ctds #81
Comments
(going off memory here since I haven't developed on Windows in a while) I suspect the windows library loader can't locate some DLL. Can you try running a tool like https://github.com/lucasg/Dependencies on the |
Sorry for the delay in getting back to you. The Would it be possible to specify a separate environmental variable just for the those required dlls and have the _tds.*.pyd file try to load the dll's from that location as an alternative? Ideally, what I would like do is see if I can include the dll files in the git repository for my program so that when other members of my team clone the repository and run it they don't have to copy those files to a custom location on their machines. |
I don't think this is possible to do programmatically in the ctds code itself as the failure occurs when the Windows library loader is trying to load the ctds code and fails due to the missing linked OpenSSL libraries. In other words the error occurs before any ctds code could execute. There may be some way to address this with a manifest or some other Windows-specific mechanism that I'm not familiar with. I haven't developed on Windows in many years, so I'm open to suggestions from someone with more knowledge of Windows development. |
So here was my work around to make this work. I was able to use sudo code to dynamically load the dll files from a location specified by me. Seems to be working well.
|
I'm using Windows 10 and I have successfully built the tds library using the provided freetds-install.ps1 script and I have been able to install ctds from pip. However when I
import ctds
I get the error:I have added the \libs folder to my Path and have also copied the files from the \libs folder into the working directory reported by
os.getcwd()
This is the same issue that was described in #24 but I was not able to resolve the issue by including the \libs in the path.
The text was updated successfully, but these errors were encountered: