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

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

@KirkEasterson

Description

@KirkEasterson

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions