OK, I had this issue and just resolved it by adding sqlalchemy.ext.baked in 
hidden imports section of the .spec file like so,

hiddenimports=['sqlalchemy.ext.baked'],

Hope it helps

On Friday, April 12, 2019 at 11:44:58 PM UTC-6, Raoul Snyman wrote:
>
> Hi everyone,
>
> We've been using PyInstaller for a number of years now to build Windows and 
> macOS versions of our software, but in our last few builds we've been getting 
> the following error when attempting to read or write to the database using 
> SQLAlchemy::
>
> Traceback (most recent call last):
>   File "openlp\plugins\songs\lib\mediaitem.py", line 500, in on_edit_click
>   File "openlp\plugins\songs\forms\editsongform.py", line 534, in load_song
>   File "site-packages\sqlalchemy\orm\attributes.py", line 276, in __get__
>   File "site-packages\sqlalchemy\orm\attributes.py", line 682, in get
>   File "site-packages\sqlalchemy\orm\strategies.py", line 723, in 
> _load_for_state
>   File "<string>", line 1, in <lambda>
>   File "site-packages\sqlalchemy\orm\strategies.py", line 772, in 
> _emit_lazyload
>   File "site-packages\sqlalchemy\util\langhelpers.py", line 929, in 
> __getattr__
>   File "<string>", line 1, in <lambda>
>   File "site-packages\sqlalchemy\orm\strategies.py", line 743, in 
> _memoized_attr__bakery
>   File "site-packages\sqlalchemy\util\langhelpers.py", line 1074, in 
> __getattr__
>   File "site-packages\sqlalchemy\util\langhelpers.py", line 1071, in 
> __getattr__ImportError: Could not resolve module sqlalchemy.ext.baked
>
> I've tried a few things, including adding an extra hook for SQLAlchemy to see 
> if it was a hidden import that wasn't being included, but that didn't seem to 
> help.
>
> We're running PyInstaller in onedir mode, the build completes without an 
> errors, though we do get two warnings:
>
> 24547 INFO:   Found 4 sqlalchemy hidden imports
>
> 24548 WARNING: Hidden import "MySQLdb" not found!
> 24549 WARNING: Hidden import "sqlalchemy.sql.functions.func" not found!
>
>
> Has anyone else run into this problem?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To post to this group, send email to pyinstaller@googlegroups.com.
Visit this group at https://groups.google.com/group/pyinstaller.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/e1df1280-01a3-4738-85ac-0fbf9bc1b8ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to