ImportError: Could not resolve module sqlalchemy.ext.baked

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

ImportError: Could not resolve module sqlalchemy.ext.baked

Raoul Snyman
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: ImportError: Could not resolve module sqlalchemy.ext.baked

Philip Kloc
Hi, I too am having this problem. I've tried all kinds of things but nothing works. I hope I don't have to resort to using pysqlite for DB operations as I like using SQLAlchemy, but frankly this is a show stopper for my project at the moment.


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 [hidden email].
To post to this group, send email to [hidden email].
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/d12a3e53-75b7-431b-a3bd-31efad133bb7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: ImportError: Could not resolve module sqlalchemy.ext.baked

Philip Kloc
In reply to this post by Raoul Snyman
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 [hidden email].
To post to this group, send email to [hidden email].
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 | Threaded
Open this post in threaded view
|

Re: ImportError: Could not resolve module sqlalchemy.ext.baked

Raoul Snyman
In reply to this post by Philip Kloc
I thought I had added that hidden import as well, but perhaps not.
I'll try that again.

On Sat, Jun 1, 2019 at 3:33 AM Philip Kloc <[hidden email]> wrote:

>
> Hi, I too am having this problem. I've tried all kinds of things but nothing works. I hope I don't have to resort to using pysqlite for DB operations as I like using SQLAlchemy, but frankly this is a show stopper for my project at the moment.
>
>
> 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 [hidden email].
> To post to this group, send email to [hidden email].
> 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/d12a3e53-75b7-431b-a3bd-31efad133bb7%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Raoul Snyman
B.Tech Information Technology (Software Engineering)
E-Mail:   [hidden email]
Web:      http://www.saturnlaboratories.co.za/
Blog:      http://blog.saturnlaboratories.co.za/
Mobile:   082 550 3754
Registered Linux User #333298 (http://counter.li.org)

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/CAJvrXnJTwHNrk5oaqHmSxGmzEwjd2m-mtqULWA_JcmF64-h4AQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.