Coder Social home page Coder Social logo

Comments (7)

bastbnl avatar bastbnl commented on May 25, 2024 3

I believe it has to do with the imports within the amqp module.

I've done some changes to get the code imported on python 2.7.3 and created pr #88. My virtualenv has vine 1.1.0, kombu 3.0.35 with celery 3.1.23 (and a lot more). I needed one more change to get celery 3.1.23 running with amqp 2.0.0 as well, but I'll create a separate pr for that

from py-amqp.

air-upc avatar air-upc commented on May 25, 2024 1

Before Python version 2.7.7, the struct.pack() function required a native string as its format argument.

from py-amqp.

MrKiven avatar MrKiven commented on May 25, 2024

anyone can check it? @ask

from py-amqp.

bastbnl avatar bastbnl commented on May 25, 2024

I'm seeing the same message using python 2.7.3 using amqp==2.0.0 since I've upgraded amqp-1.4.9 this morning.

...
from amqp import ChannelError, ConnectionError, ResourceError
File "/var/www/brownpapersession/dev/env-brownpapersession/local/lib/python2.7/site-packages/amqp/init.py", line 39, in
from .basic_message import Message # noqa
File "/var/www/brownpapersession/dev/env-brownpapersession/local/lib/python2.7/site-packages/amqp/basic_message.py", line 19, in
from . import spec
ImportError: cannot import name spec

from py-amqp.

ask avatar ask commented on May 25, 2024

Hey!

Kombu 3.x should not be used with amqp 2.0, and the kombu requirements have reflected this since the release of 3.0.0:
https://github.com/celery/kombu/blob/3.0/requirements/default.txt

If you use kombu 3.x, you should keep to the 1.4 series of py-amqp!

from py-amqp.

ask avatar ask commented on May 25, 2024

That said, I don't know if kombu 3.x is actually incompatible, and I don't understand why this error is happening.

The earliest 2.7 version I have available is 2.7.8 and importing amqp.spec works there. Same for 2.7.10.

Could you try to do a pip install vine to see if that helps?

from py-amqp.

MrKiven avatar MrKiven commented on May 25, 2024

Actually we rely librabbitmq==1.6.1,

but librabbitmq rely amqp>=1.4.6

https://github.com/celery/librabbitmq/blob/v1.6.1/requirements/default.txt

from py-amqp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.