Comments you submit will be routed for moderation. If you have an account, please log in first.
Modify

Ticket #564 (closed support: fixed)

Opened 12 months ago

Last modified 5 months ago

zmq socket AttributeError

Reported by: mannemerak@… Owned by: htgoebel
Priority: normal Milestone:
Component: Hooks Version: develop
Severity: normal Keywords:
Cc:

Description

Building simple example zmq is successful. Executing the EXE gives the following error. I am new to pyinstaller and zmq.

Windows 7 pyinstaller 2.0dev- zqm 2.2.0

Traceback (most recent call last):

File "<string>", line 21, in <module> File "c:\Users\hans\Documents\temp\pyinstaller-pyinstaller-8f7eccd\PyInstaller?\loader\iu.py", line 386, in importHook File "c:\Users\hans\Documents\temp\pyinstaller-pyinstaller-8f7eccd\PyInstaller?\loader\iu.py", line 480, in doimport File "C:\Users\hans\Documents\Development\Lumberjack\build\pyi.win32\Model\out00-PYZ.pyz\zmq", line 29, in <module> File "c:\Users\hans\Documents\temp\pyinstaller-pyinstaller-8f7eccd\PyInstaller?\loader\iu.py", line 431, in importHook File "c:\Users\hans\Documents\temp\pyinstaller-pyinstaller-8f7eccd\PyInstaller?\loader\iu.py", line 480, in doimport File "C:\Users\hans\Documents\Development\Lumberjack\build\pyi.win32\Model\out00-PYZ.pyz\zmq.core", line 26, in <module> File "c:\Users\hans\Documents\temp\pyinstaller-pyinstaller-8f7eccd\PyInstaller?\loader\iu.py", line 431, in importHook File "c:\Users\hans\Documents\temp\pyinstaller-pyinstaller-8f7eccd\PyInstaller?\loader\iu.py", line 449, in doimport File "c:\Users\hans\Documents\temp\pyinstaller-pyinstaller-8f7eccd\PyInstaller?\loader\iu.py", line 248, in getmod File "c:\Users\hans\Documents\temp\pyinstaller-pyinstaller-8f7eccd\PyInstaller?\loader\archive.py", line 495, in getmod File "c:\Users\hans\Documents\temp\pyinstaller-pyinstaller-8f7eccd\PyInstaller?\loader\iu.py", line 105, in getmod File "socket.pyx", line 65, in init zmq.core.socket (zmq\core\socket.c:7835)

AttributeError?: 'module' object has no attribute 'pysocket'

Attachments

hook-zmq.py (148 bytes) - added by hanscomps@… 11 months ago.
Updated hook file for ZMQ, added pysocket

Change History

comment:1 Changed 12 months ago by matysek

Could you please provide a link to the zmq example?

comment:2 Changed 12 months ago by anonymous

http://code.saghul.net/implementing-a-pubsub-based-application-with But any file with

import zmq context = zmq.Context()

fails to load the exe. Also, I had to copy the libzmq.dll to the windows/system32 (well any registered library path) to get pyinstaller to generate the binary.

comment:3 Changed 11 months ago by anonymous

Any more insight? What can I do to get more debugging information?

comment:4 Changed 11 months ago by matysek

  • Owner changed from matysek to htgoebel
  • Type changed from defect to support
  • Component changed from PyInstaller to Hooks
  • Milestone PyInstaller 2.0 deleted

comment:5 Changed 11 months ago by anonymous

Ok, did some digging. It seems reading the error message is useful :)

Had to add 'zmq.core.pysocket' to the hook for ZMQ

All working now. Who do I send a patch to?

comment:6 Changed 11 months ago by matysek

You can follow wiki:Development/HowtoContribute or attach the patch to this ticket.

Last edited 11 months ago by matysek (previous) (diff)

Changed 11 months ago by hanscomps@…

Updated hook file for ZMQ, added pysocket

comment:7 Changed 11 months ago by matysek

  • Status changed from new to closed
  • Resolution set to fixed

Thanks, it is commited.

comment:8 Changed 11 months ago by anonymous

So, I found that the "...\Lib\site-packages\zmq\libzmq.dll" is not added to the final build. How do I "hook" that in?

comment:9 Changed 11 months ago by matysek

That should be probably done in the hook(mod) function in file hook-zmq.py.

comment:10 Changed 5 months ago by matysek

The fix for libzmq.dll was already merged to dev trunk.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.