OCA / oca-github-bot

The GitHub Bot of the Odoo Community Association (OCA)
MIT License
40 stars 57 forks source link

[python version] ImportError : Can not import 'Command' from 'celery.bin.base' #146

Closed legalsylvain closed 2 years ago

legalsylvain commented 3 years ago

Hi.

I just updated my little oca-github-bot that is running for grap repositories. I build from the latest revision, with latest pinned python libraries. (https://github.com/OCA/oca-github-bot/commit/eaf63bf259c62dc0793f69d4bbfe86c78d6fc521) (latest changes : 27 Feb)

And I had the following error : ImportError : Can not import 'Command' from 'celery.bin.base'

Looking for that problem on the web, it seems that there is some trouble with celery and flower lib. (Ref : https://github.com/mher/flower/issues/1029)

The temporary workaround has been to pin the celery version to 4.4.7 (instead of 5.0.5) and (also other lib). The bot is now working again.

Here is the diff

-amqp==5.0.5
+amqp==2.6.0
-celery==5.0.5
+celery==4.4.7
-kombu==5.0.2
+kombu==4.6.10
-vine==5.0.0
+vine==1.3.0

Not a python lib expert, seems dirty, but if it can help ... ;-)

CC : @sbidoul

sbidoul commented 3 years ago

That is weird, because this version is deployed on OCA and shopinvader.

Where exactly do you have this ImportError ? Do you have a stack trace ?

sbidoul commented 2 years ago

@legalsylvain the problem is in flower, the queue monitoring component. It is optional and was disabled in the OCA instance. A new version of flower has been released, so #147 should fix this.