Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

"Getting Started" code doesn't run when building lcoally #57

Open
KirkEasterson opened this issue Oct 6, 2020 · 1 comment
Open

"Getting Started" code doesn't run when building lcoally #57

KirkEasterson opened this issue Oct 6, 2020 · 1 comment

Comments

@KirkEasterson
Copy link

KirkEasterson commented Oct 6, 2020

To recreate:

Install nnpy

sudo python setup.py install

Create a new file (e.g. getting_started.py) with the code from "Getting Started"

import nnpy

pub = nnpy.Socket(nnpy.AF_SP, nnpy.PUB)
pub.bind('inproc://foo')

sub = nnpy.Socket(nnpy.AF_SP, nnpy.SUB)
sub.connect('inproc://foo')
sub.setsockopt(nnpy.SUB, nnpy.SUB_SUBSCRIBE, '')

pub.send('hello, world')
print(sub.recv())

Run the file

python getting_started.py

You should see the following error

Traceback (most recent call last):
  File "getting_started.py", line 3, in <module>
    pub = nnpy.Socket(nnpy.AF_SP, nnpy.PUB)
AttributeError: module 'nnpy' has no attribute 'AF_SP'
@djc
Copy link
Member

djc commented Oct 7, 2020

Unfortunately this project is no longer a priority for me, so I'm unlikely to be able to help you much. Maybe the underlying nanomsg install doesn't actually have an AF_SP symbol, or the FFI code generation in generate.py is unable to find the library headers or otherwise failing?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants