Importing an old Plone 3.3 site as second site in my Plone 4.1 - upgrade

I'm running a Plone 4.1 site, and since we have a second site that has been down for a while, and which was built over Plone 3.3, we'd like to import that site as well into our Plone 4.1.
I have already created a separate mount point, but copying the old Data.fs file into the new mount point didn't really work.
What I'd like to do is: grab the Data.fs from the old plone install, move it to a separate mount point (it will be placed in a subfolder now, it was just under var/filestorage before), and port it to v.4.1 in some way.
I've searched various tutorials but didn't find any relevant hint on how to solve this need, anybody could give me some pointers?
thanks!

I'd suggest to:
create a clean plone4 separated environment.
copy the old data.fs to the new env
follow the section "Updating a custom Plone 3 buildout for Plone 4" from the Plone Upgrade Guide
export your upgraded site and import it in your first environment

Thanks a lot Giacomo, i was able to move further through the approach you suggested.
So what I've done was:
create a vanilla test instance matching the target version (4.1)
copy Data.fs and blobstorage folder from the old site to my test instance. (In the meantime I realised the old site was a 4.0, not a 3.3, hence I moved also the whole blobstorage folder, otherwise further export wouldn't have worked).
startup my test instance, and upgrade the storage through the "Upgrade" button on plone startup page
from ZMI, export my site to a zexp file
upload the zexp file into zinstance/var/instance/import on the target platform
enter the ZMI of the target platform, select the folder that i mapped to the mount point for my second site, and there import the zexp file
This last step of importing the zexp fails with the following error:
Error Type: TypeError
Error Value: Blobs are not supported
Troubleshooting Suggestions
The URL may be incorrect.
The parameters passed to this resource may be incorrect.
A resource that this resource relies on may be encountering an error.
Which in the logs corresponds to:
2011-10-05T12:49:27 ERROR Zope.SiteErrorLog 1317811767.860.405425857164 http://localhost:8080/mysecondsite/manage_importObject
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 619, in manage_importObject
Module OFS.ObjectManager, line 637, 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 181, in _importDuringCommit
Module ZODB.Connection, line 1302, in storeBlob
Module ZODB.Connection, line 1331, in _getBlobPath
Module ZODB.Connection, line 1344, in temporaryDirectory
Module ZODB.blob, line 686, in temporaryDirectory
Module ZODB.blob, line 492, in temp_dir
TypeError: Blobs are not supported
Any clue of how to solve this one?
Thanks!
silvio

Related

Cannot import Tensorflow with Eclipse on Ubuntu16.04

The bug happens when I try to import Tensorflow on Eclipse. Tensorflow can
be imported when I directly run the python code without using IDEs (I test it and it works perfectly). I've also tested my codes on PyCharm, it's fine with Pycharm....
I've tested the LD_LIBRARY_PATH,PATH,CUDA_HOME variables with echo. I also tried to directly append the cuda libraries into the Ecplipse pydev interpreter setting. So it is really confusing me. I did face a similar question with another machine, but I solved it by modifying the ~/.bashrc file.
I'm using Ubuntu16.04, python2.7,eclipse Neon3, GTX1080ti.
Any ideas? Following is the bug information:
Traceback (most recent call last): File "/home/zernmern/workspace/test/p1/test.py", line 2, in <module>
import tensorflow as tf
File "/home/zernmern/.local/lib/python2.7/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/home/zernmern/.local/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/zernmern/.local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 52, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/zernmern/.local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/zernmern/.local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/zernmern/.local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in
swig_import_helper_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
ImportError: libcusolver.so.8.0: cannot open shared object file: No such file or directory
Failed to load the native TensorFlow runtime.
Please let me know if more information is needed xD.
Ubuntu 16.04 uses Python 3.5 as the default system version of Python. You say that you are using Python 2.7. Did you install that yourself? It doesn't come with the OS. (And if you don't have a compelling reason to stay with Python 2.7, I would encourage you to switch to Py 3.x anyway, especially since you're working with a cutting-edge package like TensorFlow.)
Once you have two versions of Python on your system, it's easy to lose track of which packages you installed to which version of Python. I would check to see whether you happen to have installed TensorFlow, or parts of it, to the system Python 3.5 instead of your Python 2.7.
Finally, I find the solution from 'PyCharm cannot find library'
As the user 'Laizer' suggested:
The issue is that PyCharm(Here is Eclipse) was invoked from the desktop, and wasn't getting the right environment variables. Solution is to either:
invoke from the command line(i.e. Directly start eclipse by sh),
create a script to set environment and then invoke, and make a link to that script on the desktop,
or set environment variables on the desktop item

Using Django to build a template on Pydev in Eclipse

I am attempting to use the template library Django on eclipse. SO far I downloaded the Django-1.7.tar.gz and unzipped it. Then from eclipse I placed it as an external library so that I could import the module. And I can import the module leave it unused and compile my code no problem. However when I call template() I have issues.
Code:
import numpy as np
from django.template import Template, Context
t=Template("My name is {{my_name}}.")
c=Context({"my_name":"Adrian"})
t.render(c)
Output error
Traceback (most recent call last):
File "C:\Users\212412120\workspace\protype_1\main.py", line 8, in <module>
t=Template("My name is {{my_name}}.")
File "C:\Users\212412120\Downloads\Django-1.7\Django- 1.7\django\template\base.py", line 130, in __init__
if settings.TEMPLATE_DEBUG and origin is None:
File "C:\Users\212412120\Downloads\Django-1.7\Django- 1.7\django\conf\__init__.py", line 46, in __getattr__
self._setup(name)
File "C:\Users\212412120\Downloads\Django-1.7\Django-1.7\django\conf\__init__.py", line 40, in _setup
% (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting TEMPLATE_DEBUG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
I think it has something to do with the environment variables, but I am not sure. Any ideas on how to fix this issue?
I got the answer, you have to call settings.configure() it looks like this.
import django.conf import settings
settings.configure()

Xcode Shell Script Invocation Error Three20

After spending 2 days two refactoring my code (and not being able to compile), I am now getting a Shell Script Invocation Error when building the Three20 library. The file it says is missing is there. What makes no sense is that Three20 has been working fine for months and I did not touch anything in my build settings or anything in Three20. I suspect it has something to do with part of the error that says
sourceTree = "<group>'
as the combination of " and ' does not look right to me, but no idea how to fix that or why it suddenly happened.
Any ideas ?
Traceback (most recent call last):
File "../scripts/lint", line 341, in <module>
sys.exit(main())
File "../scripts/lint", line 86, in main
lint_project(os.environ['PROJECT_FILE_PATH'], options)
File "../scripts/lint", line 156, in lint_project
mtime = os.path.getmtime(filename)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/genericpath.py", line 54, in getmtime
OSError: [Errno 2] No such file or directory:'/Users/jwang/Documents/three20/src/Three20UICommon/Sources/TTGlobalUICommon.m; sourceTree = "<group>'
Command /bin/sh failed with exit code 1
not sure it's related to three20. Sounds like you have an issue with the Xcode project itself
Try opening project.pbxproj and search for sourceTree = "<group>'
somehow you got a syntax error in that file, which has to be fixed.

Can't install FacultyStaffDirectory on Plone 4.1

I am using Plone 4.1 and FacultyStaffDirectory 3.0. My buildout failed with an error (archetypes.schema < 2.1) so I pinned archetypes.schemaextender = 2.0.3 and I was able to install the FSD 3.0. However, when I try to activate it from the Add-ons page I get the following error:
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 575, in installProducts
Module Products.CMFQuickInstallerTool.QuickInstallerTool, line 512, in installProduct
__traceback_info__: ('FacultyStaffDirectory',)
Module Products.GenericSetup.tool, line 323, in runAllImportStepsFromProfile
__traceback_info__: profile-Products.FacultyStaffDirectory:default
Module Products.GenericSetup.tool, line 1074, in _runImportStepsFromContext
Module Products.GenericSetup.tool, line 245, in getSortedImportSteps
Module Products.GenericSetup.tool, line 251, in getImportStepMetadata
Module Products.GenericSetup.registry, line 295, in getStepMetadata
Module Products.GenericSetup.utils, line 104, in _resolveDottedName
__traceback_info__: Products.FacultyStaffDirectory.setuphandlers.unindexFSDTool
Module None, line 3, in <module>
ImportError: cannot import name DEFAULT_POLICIES
Faculty Staff Directory needs to be updated for Plone 4.1. The thing that needs changing is described in Plone's upgrade guide, here: http://plone.org/documentation/manual/upgrade-guide/version/upgrading-plone-4.0-to-4.1/updating-add-on-products-for-plone-4.1/use-generic-setup-for-defining-versioning-policies
At FSD's download page ( http://pypi.python.org/pypi/Products.FacultyStaffDirectory/3.0 ) you will find a contact email for the package authors to request they do this.
We're in the process of updating FacultyStaffDirectory for 4.1. The 3.1 release will remove support for Plone prior to 4.0, so we're taking some time to clean up a lot of the cruft that's accumulated in the templates and setup code. SVN trunk is at http://weblion.psu.edu/svn/weblion/weblion/Products.FacultyStaffDirectory/trunk/ if you're feeling adventurous.

PicklingError while Installing add-on

I was given the task of upgrading a plone site from 3.1.7 to 4.0.3. I've successfully gotten the site upgraded, but now I'm trying to install collective.lineage and I get the following error:
Traceback (innermost last):
Module ZPublisher.Publish, line 135, in publish
Module Zope2.App.startup, line 291, in commit
Module transaction._manager, line 93, in commit
Module transaction._transaction, line 322, in commit
Module transaction._transaction, line 416, in _commitResources
Module ZODB.Connection, line 558, in commit
Module ZODB.Connection, line 606, in _commit
Module ZODB.Connection, line 640, in _store_objects
Module ZODB.serialize, line 422, in serialize
Module ZODB.serialize, line 431, in _dump
PicklingError: Can't pickle <class 'quills.app.portlets.quillslinks.IQuillsLinksPortlet'>: import of module quills.app.portlets.quillslinks failed
Quills was installed before the upgrade, but wasn't being utilized on the site so I uninstalled it while the site was still a 3.1.7 via the quickinstaller (I don't believe quills has an uninstall profile).
Additionally, this error doesn't effect all add-on's, i installed collective.redirect yesterday without incident.
Obviously Quills didn't uninstall cleanly, but honestly don't know where to start when fixing this.
Any help would be greatly appreciated.
It looks to me like Quills assigned some portlets somewhere that were not unassigned when Quills was removed.
The best solution would be to remove those portlets before removing Quills. Unfortunately, I'm not aware of a tool to get an overview of where portlets are assigned and identify at a glance where the offending portlet is so that you can remove it. Maybe someone else knows of such a tool?
You could try exporting the portlet configuration using the portal_setup tool; the resulting portlets.xml might include information on where this portlet or portlets are assigned.
Or instead of locating and removing the portlets, you could try registering a dummy replacement of the interface that's breaking (this should go in the initialization code of some product in your instance):
import imp, sys
from zope.interface import Interface
m = imp.new_module('quills.app.portlets.quillslinks')
sys.modules['quills.app.portlets.quillslinks'] = m
m.IQuillsLinksPortlet = Interface
That last solution should be considered an ugly hack, though.