Plone Upgrade 5.0 -> 5.0.2 fails AttributeError - plone

I get following AttributeError on migration
Traceback (most recent call last):
File "/Users/nscgraf/Projects/.buildout/eggs/Products.CMFPlone-5.0.2-py2.7.egg/Products/CMFPlone/MigrationTool.py", line 268, in upgrade
step['step'].doStep(setup)
File "/Users/nscgraf/Projects/.buildout/eggs/Products.GenericSetup-1.8.1-py2.7.egg/Products/GenericSetup/upgrade.py", line 166, in doStep
self.handler(tool)
File "/Users/nscgraf/Projects/.buildout/eggs/plone.app.upgrade-1.3.20-py2.7.egg/plone/app/upgrade/v50/final.py", line 83, in to501
refresh_getIcon_catalog_metadata(context)
File "/Users/nscgraf/Projects/.buildout/eggs/plone.app.upgrade-1.3.20-py2.7.egg/plone/app/upgrade/v50/final.py", line 72, in refresh_getIcon_catalog_metadata
new_value = bool(getattr(obj.aq_base, 'image', False))
AttributeError: 'list' object has no attribute 'aq_base'
Upgrade steps:
- 4.3.4.1
- 4.3.9
- 5.0.2 (fails)
On 4.3.9 I uninstalled all "bad/old/useless products" jQuery-integration, jquery-tools...
On every step, I reinstalled all newer Products
I am thankful for hints and ideas..
(edit, submitted to early)

Related

RobotFramework - Importing test library "AutoItLibrary" failed: Initializing test library 'AutoItLibrary' with no arguments failed

Can anyone support me this case?
I install Robotframework to a machine (win10 64b). The versions in my machine:
Python3.7.2 (32b)
pywin32==224 (32b)
robotframework==3.1.1
robotframework-autoitlibrary==1.2.3
robotframework-ride==1.7.3.1
robotframework-seleniumlibrary==3.3.1
wxPython==4.0.4 (32b)
Import AutoItLibary, it is always red, Ride error log shows:
Traceback (most recent call last):
Initializing test library 'AutoItLibrary' with no arguments failed: RobotNotRunningError: Cannot access execution context
Traceback (most recent call last):
File "c:\python37-32\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 167, in _get_instance
return libcode(*self.positional_args, **dict(self.named_args))
File "c:\python37-32\lib\site-packages\AutoItLibrary\__init__.py", line 88, in __init__
self._OutputDir = self._get_log_dir()
File "c:\python37-32\lib\site-packages\AutoItLibrary\__init__.py", line 182, in _get_log_dir
variables = BuiltIn().get_variables()
File "c:\python37-32\lib\site-packages\robot\libraries\BuiltIn.py", line 1293, in get_variables
return self._variables.as_dict(decoration=is_falsy(no_decoration))
File "c:\python37-32\lib\site-packages\robot\libraries\BuiltIn.py", line 75, in _variables
return self._namespace.variables
File "c:\python37-32\lib\site-packages\robot\libraries\BuiltIn.py", line 71, in _namespace
return self._get_context().namespace
File "c:\python37-32\lib\site-packages\robot\libraries\BuiltIn.py", line 66, in _get_context
raise RobotNotRunningError('Cannot access execution context')
File "c:\python37-32\lib\site-packages\robotide\spec\librarymanager.py", line 87, in _fetch_keywords
return get_import_result(path, library_args)
File "c:\python37-32\lib\site-packages\robotide\spec\libraryfetcher.py", line 24, in get_import_result
lib = robotapi.TestLibrary(path, args)
File "c:\python37-32\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 54, in TestLibrary
lib.create_handlers()
File "c:\python37-32\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 100, in create_handlers
self._create_handlers(self.get_instance())
File "c:\python37-32\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 159, in get_instance
self._libinst = self._get_instance(self._libcode)
File "c:\python37-32\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 169, in _get_instance
self._raise_creating_instance_failed()
File "c:\python37-32\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 314, in _raise_creating_instance_failed
% (self.name, args_text, msg, details))
20190326 17:31:22.876 [INFO]: Found Robot Framework version 3.1.1 from c:\python37-32\lib\site-packages\robot.
20190326 17:31:22.876 [INFO]: Started RIDE 1.7.3.1 using python version 3.7.2 with wx version 4.0.4 in win32. ```
I had the same problem with the robotframework-autoitlibrary.
The way I found to fix and use autoit in RF was to uninstall the "robotframework-autoitlibrary" and install the "autoitlibrary" found here: https://code.google.com/archive/p/robotframework-autoitlibrary/ with python setup.py install as Admin.
Initializing error is now gone.
AutoItLibrary is not built in with robot framework you need to import the library.
pip install robotframework-autoitlibrary

Upgrade Plone 3.3.6 to either Plone 4.3.7 or Plone 5 (Error: 'tuple' object has no attribute 'remove')

I'm attempting an upgrade of an existing site from Plone 3.3.6 to Plone 4.3.7, and then on to Plone 5.0.
The existing site is very small, and has no add-on Products installed (vanilla Plone, vanilla template, etc.) It did have CacheFu installed, but after some earlier obvious errors with that, I removed it prior to the upgrade. I'm simply copying the contents of var/filestorage (Data.fs, etc) from v3 site to v4 site and re-running buildout.
In Plone 4.3.7, when running the UPGRADE option, I see a lot of successful activity, and then the following error at the bottom:
Upgrade aborted. Error:
Traceback (most recent call last):
File "/usr/local/Plone4_migration/buildout-cache/eggs/Products.CMFPlone-4.3.7-py2.7.egg/Products/CMFPlone/MigrationTool.py", line 259, in upgrade
step['step'].doStep(setup)
File "/usr/local/Plone4_migration/buildout-cache/eggs/Products.GenericSetup-1.7.7-py2.7.egg/Products/GenericSetup/upgrade.py", line 160, in doStep
self.handler(tool)
File "/usr/local/Plone4_migration/buildout-cache/eggs/plone.app.upgrade-1.3.18-py2.7.egg/plone/app/upgrade/v40/betas.py", line 99, in beta3_beta4
value.remove('Large Plone Folder')
AttributeError: 'tuple' object has no attribute 'remove'
If I skip Plone 4.x and jump right to Plone 5.0, I can't even run the UPGRADE feature, and just get the following error trace on the console:
2015-10-09 01:14:21 ERROR Zope.SiteErrorLog 1444371261.060.792132208718 http://www.example.com/example
Traceback (innermost last):
Module ZPublisher.Publish, line 127, in publish
Module ZPublisher.BaseRequest, line 444, in traverse
Module ZPublisher.BeforeTraverse, line 97, in __call__
Module Products.CMFCore.PortalObject, line 75, in __before_publishing_traverse__
Module zope.event, line 31, in notify
Module zope.component.event, line 24, in dispatch
Module zope.component._api, line 136, in subscribers
Module zope.component.registry, line 321, in subscribers
Module zope.interface.adapter, line 585, in subscribers
Module zope.component.event, line 32, in objectEventNotify
Module zope.component._api, line 136, in subscribers
Module zope.component.registry, line 321, in subscribers
Module zope.interface.adapter, line 585, in subscribers
Module plone.app.theming.plugins.hooks, line 33, in onRequest
Module plone.app.theming.policy, line 90, in isThemeEnabled
AttributeError: 'NoneType' object has no attribute 'enabled'
This is a known bug which has a fix that was not released yet: https://github.com/plone/Products.CMFPlone/issues/1134

Issue upgrading PloneFormGen on a Plone 3.3.1 migration

I'm migrating a website from Plone 3.3.1 to Plone 4.3. The migration actually worked fine with no errors, but when I tried to update PloneFormGen to the current version (1.7.8), I get this:
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module Products.CMFQuickInstallerTool.QuickInstallerTool, line 580, in installProducts
Module Products.CMFQuickInstallerTool.QuickInstallerTool, line 512, in installProduct
- __traceback_info__: ('PloneFormGen',)
Module Products.GenericSetup.tool, line 350, in runAllImportStepsFromProfile
- __traceback_info__: profile-Products.PloneFormGen:default
Module Products.GenericSetup.tool, line 1100, in _runImportStepsFromContext
Module Products.GenericSetup.tool, line 1015, in _doRunImportStep
- __traceback_info__: pleonformgen
Module Products.PloneFormGen.setuphandlers, line 79, in importVarious
Module Products.PloneFormGen.setuphandlers, line 34, in update_kupu_resources
AttributeError: getPortalTypesForResourceType
Any thoughts? I saw something about Kupu having old references to linkable types, but I think this might be a different problem. I checked through my linkable resource types and they all seem to be the standard ones.
Thanks!
I suggest you check the "Resource Types" in the Visual Editor configlet on the Plone 3.3 side. Make sure it doesn't refer to any types that are either not installed or won't be available in 4.3. You may be able to eliminate the uninstalled types simply by saving the config.
And, make sure that PFG you upgrade to is 1.7.11+. There's a security advisory covering 1.7.8 and earlier.

AttributeError: 'module' object has no attribute 'NavigationViewlet'

here is my traceback from a Plone 4.2.1 installation (on SuSE Linux):
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module OFS.ObjectManager, line 620, in manage_importObject
Module OFS.ObjectManager, line 638, in _importObjectFromFile
Module ZODB.ExportImport, line 92, in importFile
Module transaction._transaction, line 260, in savepoint
Module transaction._transaction, line 257, in savepoint
Module transaction._transaction, line 690, in __init__
Module ZODB.Connection, line 1123, in savepoint
Module ZODB.Connection, line 587, in _commit
Module ZODB.ExportImport, line 176, in _importDuringCommit
AttributeError: 'module' object has no attribute 'NavigationViewlet'
The strange thing, that I do not understand is, why only one Plone Site shows this error during import into an instance newer than Plone 4.1.5?
The Plone site has only the following additional plugins/products installed (as others too, but they all work fine):
LinguaPlone
PloneFormGen
Products.ZSyncer
collective.quickupload
So, where is my mistake/error?
Thanx for any help, because the site is too big now to "rebuild" it in a new Plone instance from scratch :-(
The plone.app.layout.viewlets.links.NavigationViewlet was removed in plone.app.layout version 2.2 (see this entry into the HTML5 PLIP and this commit).
ZEXP imports into different version stacks are generally fraught with problems, exactly because of changing persistent object locations. You'll have to import to an earlier version of the software stack, then follow the regular Plone upgrade path to bring yourself up to a more recent version of Plone.
The upgrade scripts take care of removing references to removed viewlets like these, for example.

3.3 -> 4.1 migration fails, busted RAMCache AttributeError: 'RAMCache' object has no attribute '_cacheId'

After 3.3 -> 4.1 migration I get exception on the resulting page
File "/fast/buildout-cache/eggs/plone.app.viewletmanager-2.0.2-py2.6.egg/plone/app/viewletmanager/manager.py", line 85, in render
return u'\n'.join([viewlet.render() for viewlet in self.viewlets])
File "/fast/buildout-cache/eggs/plone.memoize-1.1.1-py2.6.egg/plone/memoize/volatile.py", line 281, in replacement
cached_value = cache.get(key, _marker)
File "/fast/buildout-cache/eggs/plone.memoize-1.1.1-py2.6.egg/plone/memoize/ram.py", line 124, in get
return self.__getitem__(key)
File "/fast/buildout-cache/eggs/plone.memoize-1.1.1-py2.6.egg/plone/memoize/ram.py", line 166, in __getitem__
MARKER)
File "/fast/buildout-cache/eggs/zope.ramcache-1.0-py2.6.egg/zope/ramcache/ram.py", line 107, in query
s = self._getStorage()
File "/fast/buildout-cache/eggs/zope.ramcache-1.0-py2.6.egg/zope/ramcache/ram.py", line 122, in _getStorage
cacheId = self._cacheId
AttributeError: 'RAMCache' object has no attribute '_cacheId'
Looks like RAMCache object is in invalid state.
Also before this seeing in logs:
2012-06-21 16:42:54 INFO plone.app.upgrade Ran upgrade step: Miscellaneous
2012-06-21 16:42:54 INFO plone.app.upgrade End of upgrade path, migration has finished
2012-06-21 16:42:54 INFO plone.app.upgrade Your Plone instance is now up-to-date.
2012-06-21 16:43:02 ERROR txn.4553572352 Error in tpc_abort() on manager <Connection at 10be48490>
Traceback (most recent call last):
File "/fast/buildout-cache/eggs/transaction-1.1.1-py2.6.egg/transaction/_transaction.py", line 484, in _cleanup
rm.tpc_abort(self)
File "/fast/buildout-cache/eggs/ZODB3-3.10.5-py2.6-macosx-10.7-x86_64.egg/ZODB/Connection.py", line 730, in tpc_abort
self._storage.tpc_abort(transaction)
File "/fast/buildout-cache/eggs/ZODB3-3.10.5-py2.6-macosx-10.7-x86_64.egg/ZEO/ClientStorage.py", line 1157, in tpc_abort
self._server.tpc_abort(id(txn))
File "/fast/buildout-cache/eggs/ZODB3-3.10.5-py2.6-macosx-10.7-x86_64.egg/ZEO/ServerStub.py", line 255, in tpc_abort
self.rpc.call('tpc_abort', id)
File "/fast/buildout-cache/eggs/ZODB3-3.10.5-py2.6-macosx-10.7-x86_64.egg/ZEO/zrpc/connection.py", line 768, in call
raise inst # error raised by server
OSError: [Errno 2] No such file or directory: '/fast/xxx-2012/var/blobstorage/0x00/0x00/0x00/0x00/0x00/0x07/0xdc/0x55/0x00FWigqp.tmp-'
2012-06-21 16:43:03 ERROR Zope.SiteErrorLog 1340286183.10.000607291180815 http://localhost:9666/xxx/##plone-upgrade
Traceback (innermost last):
Module ZPublisher.Publish, line 134, in publish
Module Zope2.App.startup, line 301, in commit
Module transaction._manager, line 89, in commit
Module transaction._transaction, line 329, in commit
Module transaction._transaction, line 446, in _commitResources
Module ZODB.Connection, line 781, in tpc_vote
Module ZEO.ClientStorage, line 1098, in tpc_vote
Module ZEO.ClientStorage, line 929, in _check_serials
IOError: [Errno 2] No such file or directory: '/fast/xxx-2012/var/blobstorage/0x00/0x00/0x00/0x00/0x00/0x07/0xdd/0xca/0x009kWNYQ.tmp-'
Why this would might happen?
Any pointers how to reinitialize RAMCache object?
RAMCache is first time referred by FaviconViewlet which is using #memoize deorator and it leads to this error.
Well, your migration obviously did not complete successfully, based on the traceback. So I would focus on figuring out why it failed, rather than working around things like the broken RAMCache which are likely a result of the migration not having run.
The traceback indicates that it broke while trying to abort the transaction...so you'll probably need to do some debugging to determine what caused it to try to abort, since that's not indicated in the logs you pasted.

Resources