Missing Attribute (Really annoying)

34 views
Skip to first unread message

ronin

unread,
Jul 12, 2019, 3:48:50 AM7/12/19
to PyInstaller

I have a script which connects for a certain device and get some data to be calculated under some specifications; which runs perfectly. When i run this script with pyinstaller to make dist file it does not work. Actually there is just one attribute that is not defined. Is there a problem with imported libraries which also import other libraries ?

Vincent Le Goff

unread,
Jul 12, 2019, 4:44:17 AM7/12/19
to pyins...@googlegroups.com

Hi,


PyInstaller is supposed to guess, from your script and what it imports (and what is imported from what you import, and so on) all the relevant modules to get.  It doesn't always work, some imports are not straightforward, some are dynamically handled by importlib and PyInstaller cannot guess that.  That's why you can specify additional modules to import to help PyInstaller.  But are you sure your problem is a hidden import?  A missing attribute doesn't sound like the problem.  Could you post your traceback here?


HTH,


Vincent

On 7/12/2019 9:21 AM, ronin wrote:

I have a script which connects for a certain device and get some data to be calculated under some specifications; which runs perfectly. When i run this script with pyinstaller to make dist file it does not work. Actually there is just one attribute that is not defined. Is there a problem with imported libraries which also import other libraries ?
--
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...@googlegroups.com.
To post to this group, send email to pyins...@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/74493ec8-fe99-4111-a24d-c0feded5a93c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Angel

unread,
Jul 12, 2019, 8:32:08 AM7/12/19
to PyInstaller

I have a similar problem since January 2019. My program works well when running under python but I can not create an executable with PYINSTALLER. Hundreds of attempts with different SPEC files trying to incorporate the HIDDENMPORT that is supposedly missing without success. Again and again the message is the same

AttributeError: 'OneDriveClient' object has no attribute 'item'


Really, really annoying and desperate.

Angel

unread,
Jul 12, 2019, 8:32:27 AM7/12/19
to PyInstaller


El viernes, 12 de julio de 2019, 10:44:17 (UTC+2), Vincent Le Goff escribió:

Hi,


PyInstaller is supposed to guess, from your script and what it imports (and what is imported from what you import, and so on) all the relevant modules to get.  It doesn't always work, some imports are not straightforward, some are dynamically handled by importlib and PyInstaller cannot guess that.  That's why you can specify additional modules to import to help PyInstaller.  But are you sure your problem is a hidden import?  A missing attribute doesn't sound like the problem.  Could you post your traceback here?


HTH,


Vincent

On 7/12/2019 9:21 AM, ronin wrote:

I have a script which connects for a certain device and get some data to be calculated under some specifications; which runs perfectly. When i run this script with pyinstaller to make dist file it does not work. Actually there is just one attribute that is not defined. Is there a problem with imported libraries which also import other libraries ?
--
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 pyins...@googlegroups.com.

ronin

unread,
Jul 12, 2019, 8:32:47 AM7/12/19
to PyInstaller
Thanks 🤗. I somehow manage to get over my problem by adding sth. in hooks and hidden import. Sorry my bad. 😁

ronin

unread,
Aug 14, 2019, 8:30:16 AM8/14/19
to PyInstaller
Hi,
Did you solve problem or you have the same problem. Every library that contains missing attribute needs to be specified as hidden import, there is no limitation. If you are facing with the same problem i can help. Also there is some other libraries that can solve your problem like cx_freeze but most probably you will face same kind of problems with different ways of solutions. 😂

ronin

unread,
Aug 14, 2019, 8:30:35 AM8/14/19
to PyInstaller
Hi,

Sorry for late response. In my case, missing attribute is also a problem about imports. Library is imported but its submodules are not present. The easiest solution is, if there is any missing attributes in library it needs to be specified like hidden import. (pysunspec library had this problem)
Reply all
Reply to author
Forward
0 new messages