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

No attribute named 'spec' #101

Open
leveraction opened this issue Nov 30, 2020 · 2 comments
Open

No attribute named 'spec' #101

leveraction opened this issue Nov 30, 2020 · 2 comments

Comments

@leveraction
Copy link

I am new to this library and cut-and-pasted one of the tutorial examples. https://github.com/mosquito/aiormq#id22
When attempting to run this code I get "AttributeError: module 'aiormq' has no attribute 'spec'"
Is the documentation lagging behind the code or am I missing something else? Thanks.

@leveraction
Copy link
Author

Solved. I use PyCharm and imported the library using Poetry. The IDE reports that I am using version 4.0.1. In the aiormq/__init__.py file in my copy, the line from pamqp import commands as spec was not included at the top of the file. Also, "spec", must be added into the contents of the __all__ variable on (around line 62 in the original). That fixed it for me.

@mosquito
Copy link
Owner

mosquito commented Dec 3, 2020

4.x.x branch is unstable now. Sorry for no mensions.

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