Good morning community,
I am using plone.api and transaction to migrate content from an Archetypes Product to a Dexterity addon in Plone. The migration manages to finish alright. The problem comes when i try to open up a NamedBlobImage file or even a NamedBlobFile. This is the error I get when trying to open up an image file to edit:
/Users/rhennebrown/Plone515/zinstance/bin/python /Users/rhennebrown/Plone515/zinstance/bin/instance fg
2021-01-26 10:34:46 INFO ZServer HTTP server started at Tue Jan 26 10:34:46 2021
Hostname: 0.0.0.0
Port: 8080
2021-01-26 10:34:49 INFO DocFinderTab Applied patch version 1.0.5.
/Users/rhennebrown/Plone515/zinstance/products/FacultyCV/init.py:45: DeprecationWarning: package_home is deprecated. import from App.Common instead
from Globals import package_home
/Users/rhennebrown/Plone515/buildout-cache/eggs/plone.app.blob-1.7.4-py2.7.egg/plone/app/blob/content.py:23: DeprecationWarning: MimeTypeException is deprecated. Import from Products.MimetypesRegistry.interfaces instead
from Products.MimetypesRegistry.common import MimeTypeException
/Users/rhennebrown/Plone515/buildout-cache/eggs/plone.portlet.collection-3.3.1-py2.7.egg/plone/portlet/collection/collection.py:2: DeprecationWarning: isDefaultPage is deprecated. Import from Products.CMFPlone instead
from plone.app.layout.navigation.defaultpage import isDefaultPage
/Users/rhennebrown/Plone515/buildout-cache/eggs/Products.CMFPlone-5.1.5-py2.7.egg/Products/CMFPlone/browser/syndication/views.py:17: DeprecationWarning: wrap_form is deprecated. Import from plone.z3cform.layout instead.
from plone.app.z3cform.layout import wrap_form
2021-01-26 10:34:55 WARNING plone.behavior Specifying 'for' in behavior 'Tiles' if no 'factory' is given has no effect and is superfluous.
/Users/rhennebrown/Plone515/buildout-cache/eggs/Zope2-2.13.27-py2.7.egg/OFS/Application.py:102: DeprecationWarning: Expected text
transaction.get().note("Created Zope Application")
/Users/rhennebrown/Plone515/buildout-cache/eggs/Zope2-2.13.27-py2.7.egg/OFS/Application.py:267: DeprecationWarning: Expected text
transaction.get().note(note)
/Users/rhennebrown/Plone515/buildout-cache/eggs/Zope2-2.13.27-py2.7.egg/OFS/Application.py:523: DeprecationWarning: Expected text
transaction.get().note('Prior to product installs')
2021-01-26 10:34:58 INFO Zope Ready to handle requests
/Users/rhennebrown/Plone515/buildout-cache/eggs/Products.CMFCore-2.2.12-py2.7.egg/Products/CMFCore/DirectoryView.py:493: UserWarning: DirectoryView facultycv_styles refers to a non-existing path 'FacultyCV/skins/facultycv_styles'
(self.id, reg_key), UserWarning)
Starting Migration
Creating directory
/Users/rhennebrown/Plone515/buildout-cache/eggs/Zope2-2.13.27-py2.7.egg/Zope2/App/startup.py:344: DeprecationWarning: Expected text
T.note(path)
/Users/rhennebrown/Plone515/buildout-cache/eggs/Zope2-2.13.27-py2.7.egg/Zope2/App/startup.py:357: DeprecationWarning: Expected text
T.setUser(auth_user.getId(), auth_path)
2021-01-26 10:38:49 INFO ExtendedPathIndex Attempt to unindex nonexistent object with id -1716284823
Directory created
/Plone/directory
Brown, Rhenne
2021-01-26 10:38:49 INFO ExtendedPathIndex Attempt to unindex nonexistent object with id -1716284821
Staff created
Brown, Rhenne
2021-01-26 10:38:49 INFO ExtendedPathIndex Attempt to unindex nonexistent object with id -1716284819
Faculty created
First reappointment
pbAction created
Second Reappointment
2021-01-26 10:38:49 INFO ExtendedPathIndex Attempt to unindex nonexistent object with id -1716284815
pbActionCLT created
Third Reappointment
2021-01-26 10:38:50 INFO ExtendedPathIndex Attempt to unindex nonexistent object with id -1716284813
pbActionLeave created
Third Reappointment
2021-01-26 10:38:50 INFO ExtendedPathIndex Attempt to unindex nonexistent object with id -1716284811
pbActionPortfolio0 created
Fourth Reappointment
2021-01-26 10:38:50 INFO ExtendedPathIndex Attempt to unindex nonexistent object with id -1716284809
pbActionPortfolio0 created
Fifth Reappointment
2021-01-26 10:38:51 INFO ExtendedPathIndex Attempt to unindex nonexistent object with id -1716284807
pbActionPortfolio1 created
Sixth Reappointment
2021-01-26 10:38:51 INFO ExtendedPathIndex Attempt to unindex nonexistent object with id -1716284805
pbActionPortfolio2 created
Seventh Reappointment
2021-01-26 10:38:51 INFO ExtendedPathIndex Attempt to unindex nonexistent object with id -1716284803
pbActionScholar created
/Users/rhennebrown/Plone515/buildout-cache/eggs/zope.deprecation-4.3.0-py2.7.egg/zope/deprecation/deprecation.py:88: DeprecationWarning: isDefaultPage is deprecated. Import from Products.CMFPlone.defaultpage instead
name)
/Users/rhennebrown/Plone515/buildout-cache/eggs/Chameleon-2.25-py2.7.egg/chameleon/tal.py:471: DeprecationWarning: Using len() is deprecated. Use the length
attribute for the size of the current page, which is what we return now. Use the sequence_length
attribute for the size of the entire sequence.
iterable = list(iterable) if iterable is not None else ()
2021-01-26 10:38:56 ERROR plone.namedfile.scaling Could not scale "<Image at /Plone/portal_college/brown-rhenne/image used for /Plone/directory/brown-rhenne>" of <bound method Staff.absolute_url of <Staff at /Plone/directory/brown-rhenne>>
Traceback (most recent call last):
File "/Users/rhennebrown/Plone515/buildout-cache/eggs/plone.namedfile-4.2.6-py2.7.egg/plone/namedfile/scaling.py", line 253, in call
**parameters
File "/Users/rhennebrown/Plone515/buildout-cache/eggs/plone.namedfile-4.2.6-py2.7.egg/plone/namedfile/scaling.py", line 200, in create_scale
**parameters
File "/Users/rhennebrown/Plone515/buildout-cache/eggs/plone.scale-3.0.3-py2.7.egg/plone/scale/scale.py", line 55, in scaleImage
image = PIL.Image.open(image)
File "/Users/rhennebrown/Plone515/buildout-cache/eggs/Pillow-5.4.1-py2.7-macosx-10.9-x86_64.egg/PIL/Image.py", line 2640, in open
fp = io.BytesIO(fp.read())
AttributeError: 'Image' object has no attribute 'read'
2021-01-26 10:38:57 ERROR plone.namedfile.scaling Could not scale "<Image at /Plone/portal_college/brown-rhenne-1/image used for /Plone/directory/brown-rhenne-1>" of <bound method Faculty.absolute_url of <Faculty at /Plone/directory/brown-rhenne-1>>
Traceback (most recent call last):
File "/Users/rhennebrown/Plone515/buildout-cache/eggs/plone.namedfile-4.2.6-py2.7.egg/plone/namedfile/scaling.py", line 253, in call
**parameters
File "/Users/rhennebrown/Plone515/buildout-cache/eggs/plone.namedfile-4.2.6-py2.7.egg/plone/namedfile/scaling.py", line 200, in create_scale
**parameters
File "/Users/rhennebrown/Plone515/buildout-cache/eggs/plone.scale-3.0.3-py2.7.egg/plone/scale/scale.py", line 55, in scaleImage
image = PIL.Image.open(image)
File "/Users/rhennebrown/Plone515/buildout-cache/eggs/Pillow-5.4.1-py2.7-macosx-10.9-x86_64.egg/PIL/Image.py", line 2640, in open
fp = io.BytesIO(fp.read())
AttributeError: 'Image' object has no attribute 'read'