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.
Related
I am using Jython version 2.7.2 and I installed it using brew. And, I am using Python version 3.9.9. I want to use my python module in Jython. For doing the same, when I try
jython ez_setup.py , I get the following error :
Traceback (most recent call last):
File "ez_setup.py", line 278, in <module>
main(sys.argv[1:])
File "ez_setup.py", line 212, in main
from setuptools.command.easy_install import main
File "/Users/prachikhattar/Desktop/setuptools-0.6c11-py2.7.egg/setuptools/__init__.py", line 2, in <module>
File "/Users/prachikhattar/Desktop/setuptools-0.6c11-py2.7.egg/setuptools/extension.py", line 2, in <module>
File "/Users/prachikhattar/Desktop/setuptools-0.6c11-py2.7.egg/setuptools/dist.py", line 5, in <module>
File "/opt/homebrew/Cellar/jython/2.7.2/libexec/Lib/_fix_jython_setuptools_osx.py", line 10, in <module>
from setuptools.command import easy_install as ez
File "/Users/prachikhattar/Desktop/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 14, in <module>
ImportError: cannot import name Command
Can anyone please tell me what's going wrong?
Any help would be highly appreciated.
Thank you
Buildroot is a tool that can be used for building Linux images for embedded-system boards.
Buildroot comes with a predefined set of Python packages that can me selected from its menu.
In addition, Buildroot is added with a nice Python script that can import any package which is part of the PyPI repository, called "scanpypi".
However it seems the script is only adapted to Python2. When trying to import a newer package, errors appear, such as:
./support/scripts/scanpypi websockets -o package
buildroot package name for websockets: python-websockets
Package: python-websockets
Fetching package websockets
Downloading package websockets from https://pypi.python.org/packages/b6/12/6194aac840c65253e45a38912e318f9ac548f9ba86d75bdb8fe66841b335/websockets-4.0.1.tar.gz...
Traceback (most recent call last):
File "./support/scripts/scanpypi", line 653, in <module>
main()
File "./support/scripts/scanpypi", line 604, in main
package.load_setup()
File "./support/scripts/scanpypi", line 250, in load_setup
setup = imp.load_module('setup', s_file, s_path, s_desc)
File "/tmp/scanpypi-qbY6eQ/python-websockets/websockets-4.0.1/setup.py", line 11, in <module>
TypeError: 'encoding' is an invalid keyword argument for this function
This one was failing for invalid keyword.
Also:
./support/scripts/scanpypi websocket-server -o package
buildroot package name for websocket-server: python-websocket-server
Package: python-websocket-server
Fetching package websocket-server
Downloading package websocket-server from https://pypi.python.org/packages/74/64/e86581ee7775a2e08aca530b41e1a1e3ee6b320233b1eff301dcb86d1636/websocket_server-0.4.tar.gz...
Traceback (most recent call last):
File "./support/scripts/scanpypi", line 653, in <module>
main()
File "./support/scripts/scanpypi", line 604, in main
package.load_setup()
File "./support/scripts/scanpypi", line 247, in load_setup
os.chdir(self.tmp_extract)
OSError: [Errno 2] No such file or directory: '/tmp/scanpypi-YXROmL/python-websocket-server/websocket-server-0.4'
This one was failing for package name containing underscore (_) instead of dash (-).
I have created a Python3 porting for scanpypi.
See https://github.com/ishahak/buildroot_scanpypi3
EDIT
By the request of #yegorich, I'm glad to inform that now scanpypi can be used for both Python 2/3!
My linked version can still be used for installing newer versions directly from GitHub.
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
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
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.