ImportError: cannot import name base_hasattr
Hi: This really should go to the Plone list, but seeing as how I can't hit their site from either of my browsers, how can I subscribe to the list? I couldn't download Plone, either, so I just built it from tarballs from an earlier installation, tarballing all the products associated with it (Plone 2.1.4, I think). Then I loaded them up in Zope 2.7.8 and got this error: Traceback (most recent call last): File "/usr/local/www/zope/278/lib/python/OFS/Application.py", line 673, in import_product File "/usr/local/zope/instance1/Products/ATContentTypes/__init__.py", line 54, in ? import Products.ATContentTypes.content File "/usr/local/zope/instance1/Products/ATContentTypes/content/__init__.py", line 34, in ? import Products.ATContentTypes.content.topic File "/usr/local/zope/instance1/Products/ATContentTypes/content/topic.py", line 33, in ? from Products.CMFPlone.CatalogTool import CatalogTool File "/usr/local/zope/instance1/Products/CMFPlone/CatalogTool.py", line 27, in ? from Products.CMFPlone.utils import base_hasattr ImportError: cannot import name base_hasattr Traceback (most recent call last): File "/usr/local/zope/278/lib/python/Zope/Startup/run.py", line 50, in ? run() File "/usr/local/zope/278/lib/python/Zope/Startup/run.py", line 19, in run start_zope(opts.configroot) File "/usr/local/zope/278/lib/python/Zope/Startup/__init__.py", line 52, in start_zope starter.startZope() File "/usr/local/zope/278/lib/python/Zope/Startup/__init__.py", line 231, in startZope Zope.startup() File "/usr/local/zope/278/lib/python/Zope/Startup/__init__.py", line 47, in startup # drop privileges after setting up servers File "/usr/local/www/zope/278/lib/python/Zope/App/startup.py", line 45, in startup File "/usr/local/www/zope/278/lib/python/OFS/Application.py", line 650, in import_products File "/usr/local/www/zope/278/lib/python/OFS/Application.py", line 673, in import_product File "/usr/local/zope/instance1/Products/ATContentTypes/__init__.py", line 54, in ? import Products.ATContentTypes.content File "/usr/local/zope/instance1/Products/ATContentTypes/content/__init__.py", line 34, in ? import Products.ATContentTypes.content.topic File "/usr/local/zope/instance1/Products/ATContentTypes/content/topic.py", line 33, in ? from Products.CMFPlone.CatalogTool import CatalogTool File "/usr/local/zope/instance1/Products/CMFPlone/CatalogTool.py", line 27, in ? from Products.CMFPlone.utils import base_hasattr ImportError: cannot import name base_hasattr CMFPlone/utils.py has a class named base_hasattr, so what's the problem? Perhaps I need to delete all the *.pyc files from the other server from which I copied all these products? (Lot of work, avoiding that since I'm not sure it's necessary, and there aren't any in CMFPlone anyway.) TIA, Tony ________________________________________________________________________ Check out the new AOL. Most comprehensive set of free safety and security tools, free access to millions of high-quality videos from across the web, free AOL Mail and more.
This really should go to the Plone list, but seeing as how I can't hit their site from either of my browsers, how can I subscribe to the list? plone.org works fine for me. You can subscribe to plone-users list at: https://lists.sourceforge.net/lists/listinfo/plone-users
Maybe you have something wrong with your PYTHONPATH. -- Maciej Wisniowski
Maciej Wisniowski recently responded something to the effect of that I should take a look at my PYTHONPATH and gave me the address for subscribing to Plone. Thank you. I subscribed and posted to Plone, but after a day have received no response :( I looked at my PYTHONPATH, as per your suggestion, but it seemed to be in order. Furthermore, if it were not correct, how could I pull up Zope in any case? I can launch Zope, I just have a problem with the below-mentioned product installation (and maybe others after it). TIA, Tony Hi: This really should go to the Plone list, but seeing as how I can't hit their site from either of my browsers, how can I subscribe to the list? I couldn't download Plone, either, so I just built it from tarballs from an earlier installation, tarballing all the products associated with it (Plone 2.1.4, I think). Then I loaded them up in Zope 2.7.8 and got this error: Traceback (most recent call last): File "/usr/local/www/zope/278/lib/python/OFS/Application.py", line 673, in import_product File "/usr/local/zope/instance1/Products/ATContentTypes/__init__.py", line 54, in ? import Products.ATContentTypes.content File "/usr/local/zope/instance1/Products/ATContentTypes/content/__init__.py", line 34, in ? import Products.ATContentTypes.content.topic File "/usr/local/zope/instance1/Products/ATContentTypes/content/topic.py", line 33, in ? from Products.CMFPlone.CatalogTool import CatalogTool File "/usr/local/zope/instance1/Products/CMFPlone/CatalogTool.py", line 27, in ? from Products.CMFPlone.utils import base_hasattr ImportError: cannot import name base_hasattr Traceback (most recent call last): File "/usr/local/zope/278/lib/python/Zope/Startup/run.py", line 50, in ? run() File "/usr/local/zope/278/lib/python/Zope/Startup/run.py", line 19, in run start_zope(opts.configroot) File "/usr/local/zope/278/lib/python/Zope/Startup/__init__.py", line 52, in start_zope starter.startZope() File "/usr/local/zope/278/lib/python/Zope/Startup/__init__.py", line 231, in startZope Zope.startup() File "/usr/local/zope/278/lib/python/Zope/Startup/__init__.py", line 47, in startup # drop privileges after setting up servers File "/usr/local/www/zope/278/lib/python/Zope/App/startup.py", line 45, in startup File "/usr/local/www/zope/278/lib/python/OFS/Application.py", line 650, in import_products File "/usr/local/www/zope/278/lib/python/OFS/Application.py", line 673, in import_product File "/usr/local/zope/instance1/Products/ATContentTypes/__init__.py", line 54, in ? import Products.ATContentTypes.content File "/usr/local/zope/instance1/Products/ATContentTypes/content/__init__.py", line 34, in ? import Products.ATContentTypes.content.topic File "/usr/local/zope/instance1/Products/ATContentTypes/content/topic.py", line 33, in ? from Products.CMFPlone.CatalogTool import CatalogTool File "/usr/local/zope/instance1/Products/CMFPlone/CatalogTool.py", line 27, in ? from Products.CMFPlone.utils import base_hasattr ImportError: cannot import name base_hasattr CMFPlone/utils.py has a class named base_hasattr, so what's the problem? Perhaps I need to delete all the *.pyc files from the other server from which I copied all these products? (Lot of work, avoiding that since I'm not sure it's necessary, and there aren't any in CMFPlone anyway.) TIA, Tony Check out the new AOL. Most comprehensive set of free safety and security tools, free access to millions of high-quality videos from across the web, free AOL Mail and more. ________________________________________________________________________ AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.com.
Maciej Wisniowski recently responded something to the effect of that I should take a look at my PYTHONPATH and gave me the address for subscribing to Plone. Thank you. I subscribed and posted to Plone, but after a day have received no response :( I looked at my PYTHONPATH, as per your suggestion, but it seemed to be in order. Furthermore, if it were not correct, how could I pull up Zope in any case? I can launch Zope, I just have a problem with the below-mentioned product installation (and maybe others after it). I'm not sure but seems that you have some mess in your directories (or this is because of hardcoded paths in your .pyc files).
Take a look at pathes in your traceback: /usr/local/www/zope/278/lib/python /usr/local/zope/278/lib/python /usr/local/zope/instance1/Products Why there are two different(!) lib/python/ folders? -- Maciej Wisniowski
from Products.CMFPlone.utils import base_hasattr ImportError: cannot import name base_hasattr
CMFPlone/utils.py has a class named base_hasattr, so what's the problem?
You might try this (I'm not sure if this works with Zope 2.7): run /usr/local/zope/instance1/bin/zopectl on zopectl prompt enter: zopectl> debug and when you'll see python prompt write:
import Products.CMFPlone print Products.CMFPlone <module 'Products.CMFPlone' from '/opt/Zope/instancje/Zope296/Products/CMFPlone/__init__.pyc'>
and check what path you have there. -- Maciej Wisniowski
tonylabarbara@aol.com wrote:
Hi: This really should go to the Plone list, but seeing as how I can't hit their site from either of my browsers, how can I subscribe to the list? I couldn't download Plone, either, so I just built it from tarballs from an earlier installation, tarballing all the products associated with it (Plone 2.1.4, I think). Then I loaded them up in Zope 2.7.8 and got this error:
Traceback (most recent call last): File "/usr/local/www/zope/278/lib/python/OFS/Application.py", line 673, in import_product File "/usr/local/zope/instance1/Products/ATContentTypes/__init__.py", line 54, in ? import Products.ATContentTypes.content File "/usr/local/zope/instance1/Products/ATContentTypes/content/__init__.py", line 34, in ? import Products.ATContentTypes.content.topic File "/usr/local/zope/instance1/Products/ATContentTypes/content/topic.py", line 33, in ? from Products.CMFPlone.CatalogTool import CatalogTool File "/usr/local/zope/instance1/Products/CMFPlone/CatalogTool.py", line 27, in ? from Products.CMFPlone.utils import base_hasattr ImportError: cannot import name base_hasattr Traceback (most recent call last): File "/usr/local/zope/278/lib/python/Zope/Startup/run.py", line 50, in ? run() File "/usr/local/zope/278/lib/python/Zope/Startup/run.py", line 19, in run start_zope(opts.configroot) File "/usr/local/zope/278/lib/python/Zope/Startup/__init__.py", line 52, in start_zope starter.startZope() File "/usr/local/zope/278/lib/python/Zope/Startup/__init__.py", line 231, in startZope Zope.startup() File "/usr/local/zope/278/lib/python/Zope/Startup/__init__.py", line 47, in startup # drop privileges after setting up servers File "/usr/local/www/zope/278/lib/python/Zope/App/startup.py", line 45, in startup File "/usr/local/www/zope/278/lib/python/OFS/Application.py", line 650, in import_products File "/usr/local/www/zope/278/lib/python/OFS/Application.py", line 673, in import_product File "/usr/local/zope/instance1/Products/ATContentTypes/__init__.py", line 54, in ? import Products.ATContentTypes.content File "/usr/local/zope/instance1/Products/ATContentTypes/content/__init__.py", line 34, in ? import Products.ATContentTypes.content.topic File "/usr/local/zope/instance1/Products/ATContentTypes/content/topic.py", line 33, in ? from Products.CMFPlone.CatalogTool import CatalogTool File "/usr/local/zope/instance1/Products/CMFPlone/CatalogTool.py", line 27, in ? from Products.CMFPlone.utils import base_hasattr ImportError: cannot import name base_hasattr
I am getting the same problem with Zope 2.8.8 installed with the Windows Installer and Plone 2.1.4 for all platforms. I removed all the pyc files and the problem persists. This is on Win 2K. Suresh
participants (3)
-
Maciej Wisniowski -
Suresh V -
tonylabarbara@aol.com