Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'Endpoint' object has no attribute '_name' #87

Closed
carver opened this issue May 24, 2019 · 3 comments
Closed

AttributeError: 'Endpoint' object has no attribute '_name' #87

carver opened this issue May 24, 2019 · 3 comments

Comments

@carver
Copy link
Contributor

carver commented May 24, 2019

What was wrong?

Code that produced the error

I guess a broadcast call from an endpoint created with Endpoint().

Full error output

future: <Task finished coro=<Endpoint.broadcast() done, defined at .../lahja/endpoint.py:405> exception=AttributeError("'Endpoint' object has no attribute '_name'",)>
Traceback (most recent call last):
  File "..../lahja/endpoint.py", line 412, in broadcast
    item._origin = self.name
  File ".../lahja/endpoint.py", line 196, in name
    return self._name
AttributeError: 'Endpoint' object has no attribute '_name'

Environment

v0.12.0

How can it be fixed?

Either the name should be required on init, or _name shouldn't be required at all (maybe an internally generated one, if necessary).

I think I prefer not needing a name

@pipermerriam
Copy link
Member

I think that's old code. nuke your lahja and then re-install from dev requirements. I think the git requirement that is in there right now doesn't replace an existing install

@pipermerriam
Copy link
Member

#75 is the PR that makes name a constructor of Endpoint

@carver
Copy link
Contributor Author

carver commented May 24, 2019

👍 just wanted to capture it against v0.12.0. Didn't try master. Will close as fixed.

@carver carver closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants