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

Update hiddenimports for pymssql 2.2.0+ #315

Merged
merged 5 commits into from
Sep 7, 2021

Conversation

eric15342335
Copy link
Contributor

Script is import pymssql

6167 WARNING: Hidden import "_mssql" not found!
Traceback (most recent call last):
  File "a.py", line 1, in <module>
    import pymssql
  File "PyInstaller\loader\pyimod03_importers.py", line 493, in exec_module
  File "pymssql\__init__.py", line 3, in <module>
  File "src\pymssql\_pymssql.pyx", line 1, in init pymssql._pymssql
ModuleNotFoundError: No module named 'pymssql._mssql'
[3068] Failed to execute script 'a' due to unhandled exception!

https://stackoverflow.com/questions/69076831/how-to-get-rid-of-the-error-ms-sql-not-found

I am confused.

@eric15342335 eric15342335 requested review from a team, Legorooj and bwoodsend and removed request for a team and Legorooj September 7, 2021 10:02
@eric15342335 eric15342335 changed the title hook: fix pymssql._mssql hidden cython extension import hooks: fix pymssql._mssql hidden cython extension import Sep 7, 2021
@eric15342335
Copy link
Contributor Author

I don't understand why the original one was split into two hooks.

@rokm
Copy link
Member

rokm commented Sep 7, 2021

I don't understand why the original one was split into two hooks.

Probably because older versions have/had different layout than the latest version: https://files.pythonhosted.org/packages/d6/2c/2733701c16cbd5aa047cff8e52b84dfa9fb583fc4afa3b2a5b7f03a4054a/pymssql-2.1.5-cp39-cp39-manylinux1_x86_64.whl

@eric15342335 eric15342335 changed the title hooks: fix pymssql._mssql hidden cython extension import Update hiddenimports for pymssql 2.2.0+ Sep 7, 2021
@rokm
Copy link
Member

rokm commented Sep 7, 2021

Looks good to me. Can you run the oneshot test against multiple different versions of pymssql just to be sure, though? (e.g., 2.1.5, 2.2.0, and 2.2.2)

@bwoodsend
Copy link
Member

I've just launched them. Here's 2.2.2, 2.2.0 and 2.1.5.

@bwoodsend bwoodsend merged commit 86a6eb7 into pyinstaller:master Sep 7, 2021
@eric15342335 eric15342335 deleted the pymssql._mssql branch September 7, 2021 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants