plone 4 migration error and solution [part 1]

File “/home/tareq/DATA/projects/POLBIO_FOLDER/polbio_414/zinstance/products/AuditGridField/interfaces.py”, line 8, in

from Interface import Interface

ImportError: No module named Interface

Solution:

# Zope imports

#from Interface import Interface

#PLONE4

from zope.interface import Interface

Error:

AttributeError: type object ‘ObjectField’ has no attribute ‘__implements__’

Solution:

from zope.interface import implements

implements(IDataGridField)

Error:

Products.validation.exceptions.FalseValidatorError: Solution:

This means that the specified validator is using old interfaces and is not working anymore. You need to remove this line:

__implements__= (IValidator,)

(IValidator might be called ivalidator in all lowercase, at least in this specific example) and replace it with this:

implements(IValidator)

 

Error:
ImportError: No module named GlobalTranslationService

Solution

from zope.i18n import translate 
msg = translate(msg, 'Poi', context=self.request) 

Error:
AttributeError: 'module' object has no attribute 'BrowserView'
Solution:
replace utils.BrowserView

from Products.Five.browser import BrowserView

Error:
from Products.CMFPlone import Batch
ImportError: cannot import name Batch
Solution:
from Products.CMFPlone import Batch -> from Products.CMFPlone.PloneBatch import Batch

Change
from Products.Five.formlib import formbase
TO->
from five.formlib import formbase

Error:
ImportError: No module named cElementTree
Sol:



Advertisements
About

Work is fun!

Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Disclaimer
All content provided on this "tareqalam.com" blog is for informational purposes only. The owner of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. The owner of [tareqalam.wordpress.com] will not be liable for any errors or omissions in this information nor for the availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of this information.
May 2012
M T W T F S S
« Apr   Jun »
 123456
78910111213
14151617181920
21222324252627
28293031  

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 23 other followers

%d bloggers like this: