Discussion:
[sqlalchemy] Issue with Sqlalchemy in exe file(created using pyinstaller)
b***@gmail.com
2018-05-15 19:59:08 UTC
Permalink
I have been struggling for a few days due to an issue with SQLAlchemy.

The line of code which is giving problem is

engine =
sqlalchemy.create_engine('teradata://***@DBinstance?driver=Teradata')

This code works perfectly fine while running from Spyder while running from
.py file.
But while converting to an exe file and run, it gives the following error:

sqlalchemy.exc.NoSuchModuleError: Can't load plugin:
sqlalchemy.dialects:teradata


Any help would be appreciated.


Regards
Binil
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.
Simon King
2018-05-16 08:26:23 UTC
Permalink
Post by b***@gmail.com
I have been struggling for a few days due to an issue with SQLAlchemy.
The line of code which is giving problem is
engine =
This code works perfectly fine while running from Spyder while running from
.py file.
sqlalchemy.dialects:teradata
Any help would be appreciated.
It's possible that pyinstaller hasn't included the sqlalchemy_teradata
package in its output. Perhaps adding "--hidden-import
sqlalchemy_teradata" to your command line when building the exe might
help?

Simon
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.
b***@gmail.com
2018-05-21 19:02:04 UTC
Permalink
I tried --hidden-import sqlalchemy_teradata. It didnt help. Any way thanks
for the suggestion.
Post by Simon King
Post by b***@gmail.com
I have been struggling for a few days due to an issue with SQLAlchemy.
The line of code which is giving problem is
engine =
This code works perfectly fine while running from Spyder while running
from
Post by b***@gmail.com
.py file.
But while converting to an exe file and run, it gives the following
sqlalchemy.dialects:teradata
Any help would be appreciated.
It's possible that pyinstaller hasn't included the sqlalchemy_teradata
package in its output. Perhaps adding "--hidden-import
sqlalchemy_teradata" to your command line when building the exe might
help?
Simon
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.
Simon King
2018-05-22 09:23:16 UTC
Permalink
You'll probably need to take this up with the PyInstaller folks
(http://www.pyinstaller.org/support.html). SQLAlchemy uses
pkg_resources entry points to load database dialects, and I don't know
how well PyInstaller supports those.

Sorry,

Simon
Post by b***@gmail.com
I tried --hidden-import sqlalchemy_teradata. It didnt help. Any way thanks
for the suggestion.
Post by Simon King
Post by b***@gmail.com
I have been struggling for a few days due to an issue with SQLAlchemy.
The line of code which is giving problem is
engine =
This code works perfectly fine while running from Spyder while running from
.py file.
sqlalchemy.dialects:teradata
Any help would be appreciated.
It's possible that pyinstaller hasn't included the sqlalchemy_teradata
package in its output. Perhaps adding "--hidden-import
sqlalchemy_teradata" to your command line when building the exe might
help?
Simon
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and
Verifiable Example. See http://stackoverflow.com/help/mcve for a full
description.
---
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.
Loading...