ERROR Application Could not import Products.AdvancedQuery

I am getting this error when running the ‘bin/plonectl start’.

ERROR Application Could not import Products.AdvancedQuery
Traceback (most recent call last):
File “/home/vagrant/Plone/zinstance/eggs/Zope2-2.13.28-py2.7.egg/OFS/Application.py”, line 608, in import_product
product=import(pname, global_dict, global_dict, silly)
File “/home/vagrant/Plone/zinstance/eggs/Products.AdvancedQuery-4.0-py2.7.egg/Products/AdvancedQuery/init.py”, line 19, in
from .eval import eval as _eval, _notPassed
File “/home/vagrant/Plone/zinstance/eggs/Products.AdvancedQuery-4.0-py2.7.egg/Products/AdvancedQuery/eval/init.py”, line 18, in
from .interfaces import IQueryContext
File “/home/vagrant/Plone/zinstance/eggs/Products.AdvancedQuery-4.0-py2.7.egg/Products/AdvancedQuery/eval/interfaces.py”, line 9, in
from .transform import IOptimizer, IOrdered, IOptimizerChain, ITransformer
File “/home/vagrant/Plone/zinstance/eggs/Products.AdvancedQuery-4.0-py2.7.egg/Products/AdvancedQuery/eval/transform.py”, line 102, in
from .adapter import getSubscriptionAdapter, querySubscriptionAdapter
File “/home/vagrant/Plone/zinstance/eggs/Products.AdvancedQuery-4.0-py2.7.egg/Products/AdvancedQuery/eval/adapter/init.py”, line 44, in
from zope.interface.interfaces import ComponentLookupError
ImportError: cannot import name ComponentLookupError

can someone plz help to overcome this. Thanks

add version pinnings in your buildout.cfg

[versions]
Products.AdvancedQuery =<4

then run bin/buildout again

2 Likes

Amazing. It works for me. I got the senite index page also. but when I click current senite installation got this error
“error(‘unpack requires a string argument of length 4’,) (Also, the following error occurred while attempting to render the standard error message, please see the event log for full details: unpack requires a string argument of length 4)”

I had better luck by adding

Products.AdvancedQuery < 4

to my requirements.txt prior to installing. Everything seems to work with Products.AdvancedQuery 3.4, but not with >4.0.
senaite.sync does not work without doing this.