The object at http://localhost:8080/Plone/getPhysicalPath has an empty or missing docstring

I am use transmogrify.ploneremote package with mr.migrator package and when I run the migrate script show the following error:

$ ./bin/migrate 
Traceback (most recent call last):
  File "./bin/migrate", line 122, in <module>
    sys.exit(mr.migrator.runner.runner({},"pipeline.cfg"))
  File "/home/macagua/proyectos/plone/mr_migrator_demo/src/mr.migrator/mr/migrator/runner/__init__.py", line 138, in runner
    transmogrifier(pipelineid, **overrides)
  File "/home/macagua/.buildout/eggs/collective.transmogrifier-1.5.1-py2.7.egg/collective/transmogrifier/transmogrifier.py", line 63, in __call__
    for item in pipeline:
  File "/home/macagua/.buildout/eggs/collective.transmogrifier-1.5.1-py2.7.egg/collective/transmogrifier/sections/logger.py", line 39, in __iter__
    for item in self.previous:
  File "/home/macagua/proyectos/plone/mr_migrator_demo/src/transmogrify.ploneremote/transmogrify/ploneremote/remoteworkflowupdater.py", line 41, in __iter__
    for item in self.previous:
  File "/home/macagua/.buildout/eggs/collective.transmogrifier-1.5.1-py2.7.egg/collective/transmogrifier/sections/inserter.py", line 19, in __iter__
    for item in self.previous:
  File "/home/macagua/proyectos/plone/mr_migrator_demo/src/transmogrify.ploneremote/transmogrify/ploneremote/remoteschemaupdater.py", line 42, in __iter__
    for item in self.previous:
  File "/home/macagua/proyectos/plone/mr_migrator_demo/src/transmogrify.ploneremote/transmogrify/ploneremote/remoteconstructor.py", line 45, in __iter__
    self.basepath = proxy.getPhysicalPath()
  File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1587, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1273, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1306, in single_request
    return self.parse_response(response)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1482, in parse_response
    return u.close()
  File "/usr/lib/python2.7/xmlrpclib.py", line 794, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault -1: 'Unexpected Zope exception: \nTraceback (most recent call last):\n  File "/home/macagua/.buildout/eggs/Zope2-2.13.24-py2.7.egg/ZPublisher/Publish.py", line 249, in publish_module_standard\n    response = publish(request, module_name, after_list, debug=debug)\n  File "/home/macagua/.buildout/eggs/Zope2-2.13.24-py2.7.egg/ZPublisher/Publish.py", line 177, in publish\n    sys.exc_info()[2],\n  File "/home/macagua/.buildout/eggs/plone.app.linkintegrity-1.5.8-py2.7.egg/plone/app/linkintegrity/monkey.py", line 21, in zpublisher_exception_hook_wrapper\n    return zpublisher_exception_hook(published, REQUEST, t, v, traceback)\n  File "/home/macagua/.buildout/eggs/Zope2-2.13.24-py2.7.egg/ZPublisher/Publish.py", line 127, in publish\n    object=request.traverse(path, validated_hook=validated_hook)\n  File "/home/macagua/.buildout/eggs/Zope2-2.13.24-py2.7.egg/ZPublisher/BaseRequest.py", line 528, in traverse\n    return response.debugError(e.args)\n  File "/home/macagua/.buildout/eggs/Zope2-2.13.24-py2.7.egg/ZPublisher/HTTPResponse.py", line 727, in debugError\n    "\\n%s</p>" % entry)\nNotFound:    Site Error \n   An error was encountered while publishing this resource.\n   \n    Debugging Notice  \n\n  Zope has encountered a problem publishing your object. \nThe object at http://localhost:8080/Plone/getPhysicalPath has an empty or missing docstring. Objects must have a docstring to be published. \n   \n\n   Troubleshooting Suggestions \n\n   \n   The URL may be incorrect. \n   The parameters passed to this resource may be incorrect. \n   A resource that this resource relies on may be\n      encountering an error. \n   \n\n   For more detailed information about the error, please\n  refer to the error log.\n   \n\n   If the error persists please contact the site maintainer.\n  Thank you for your patience.\n   \n'>

My pipeline is the following:

[transmogrifier]
pipeline = 
    source
    constructor
    schemaupdater
    objectpublisher
    workflowupdater
    logger

[constructor]
blueprint = transmogrify.ploneremote.remoteconstructor
target = ${misc:target}

[logger]
blueprint = collective.transmogrifier.sections.logger
level = 1
name = logger
key = _path

[misc]
target = http://admin:admin@localhost:8080/Plone

[objectpublisher]
blueprint = collective.transmogrifier.sections.inserter
key = string:_transitions
value = python:["publish"]

[schemaupdater]
blueprint = transmogrify.ploneremote.remoteschemaupdater
target = ${misc:target}

[source]
blueprint = transmogrify.filesystem
directory = ./data

# We want to create pages not files
file-field = text
file-type = Document

# We do not need to wrap page content in OFS.File
wrap-data = False

[workflowupdater]
blueprint = transmogrify.ploneremote.remoteworkflowupdater
transitions = publish
transitions-key = _transitions
target = ${misc:target}

my buildout configuration:

[buildout]
extends = https://raw.github.com/collective/buildout.plonetest/master/test-4.3.x.cfg

extensions = mr.developer

auto-checkout =
#    plone.app.blob
    mr.migrator
    transmogrify.ploneremote

develop =
package-extras =
test-eggs =

parts -= test
parts += migrate

[versions]
# mr.migrator = 1.1

[sources]
# plone.app.blob = git git@github.com:aclark4life/plone.app.blob.git
mr.migrator = git https://github.com/collective/mr.migrator.git
transmogrify.ploneremote = git https://github.com/collective/transmogrify.ploneremote.git

[migrate]
recipe = mr.migrator
pipeline = pipeline.cfg
eggs =
    mr.migrator
    transmogrify.filesystem
    transmogrify.ploneremote

The Zope instance working very well look:

$ ./bin/instance fg
2016-11-29 10:03:59 INFO ZServer HTTP server started at Tue Nov 29 10:03:59 2016
	Hostname: 0.0.0.0
	Port: 8080
2016-11-29 10:04:01 INFO Plone OpenID system packages not installed, OpenID support not available
2016-11-29 10:04:02 INFO Zope Ready to handle requests

And I can create a Plone site on url http://localhost:8080/Plone

These buildout configuration are from an update mr_migrator_demo fork https://github.com/macagua/mr_migrator_demo

Also I when I debug my Zope instance, I catch the error when I try to get the Zope physical path, like this:

>>> import xmlrpclib
>>> proxy = xmlrpclib.ServerProxy('http://admin:admin@localhost:8080/Plone')
>>> proxy
<ServerProxy for admin:admin@localhost:8080/Plone>
>>> print proxy
<ServerProxy for admin:admin@localhost:8080/Plone>
>>> type(proxy)
<type 'instance'>
>>> proxy.getPhysicalPath()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1587, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1273, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1306, in single_request
    return self.parse_response(response)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1482, in parse_response
    return u.close()
  File "/usr/lib/python2.7/xmlrpclib.py", line 794, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault -1: 'Unexpected Zope exception: \nTraceback (most recent call last):\n  File "/home/macagua/.buildout/eggs/Zope2-2.13.24-py2.7.egg/ZPublisher/Publish.py", line 249, in publish_module_standard\n    response = publish(request, module_name, after_list, debug=debug)\n  File "/home/macagua/.buildout/eggs/Zope2-2.13.24-py2.7.egg/ZPublisher/Publish.py", line 177, in publish\n    sys.exc_info()[2],\n  File "/home/macagua/.buildout/eggs/plone.app.linkintegrity-1.5.8-py2.7.egg/plone/app/linkintegrity/monkey.py", line 21, in zpublisher_exception_hook_wrapper\n    return zpublisher_exception_hook(published, REQUEST, t, v, traceback)\n  File "/home/macagua/.buildout/eggs/Zope2-2.13.24-py2.7.egg/ZPublisher/Publish.py", line 127, in publish\n    object=request.traverse(path, validated_hook=validated_hook)\n  File "/home/macagua/.buildout/eggs/Zope2-2.13.24-py2.7.egg/ZPublisher/BaseRequest.py", line 528, in traverse\n    return response.debugError(e.args)\n  File "/home/macagua/.buildout/eggs/Zope2-2.13.24-py2.7.egg/ZPublisher/HTTPResponse.py", line 727, in debugError\n    "\\n%s</p>" % entry)\nNotFound:    Site Error \n   An error was encountered while publishing this resource.\n   \n    Debugging Notice  \n\n  Zope has encountered a problem publishing your object. \nThe object at http://localhost:8080/Plone/getPhysicalPath has an empty or missing docstring. Objects must have a docstring to be published. \n   \n\n   Troubleshooting Suggestions \n\n   \n   The URL may be incorrect. \n   The parameters passed to this resource may be incorrect. \n   A resource that this resource relies on may be\n      encountering an error. \n   \n\n   For more detailed information about the error, please\n  refer to the error log.\n   \n\n   If the error persists please contact the site maintainer.\n  Thank you for your patience.\n   \n'>
>>> 

For a moment, I thought my installation of Plone is bad and I try to create a new installation of Plone 4.3.x and I still opting for the same error.

What should be wrong with the Zope?

Any idea?

I reported this, as an issue at https://github.com/collective/transmogrify.ploneremote/issues/13

If you open a python shell and:

 >>> print '''The text returned by zope''''

it is clearly readable that in some way you are traversing to a method unallowed TTW.

The object at http://localhost:8080/Plone/getPhysicalPath has an empty or missing docstring. Objects must have a docstring to be published.

I do not know if it ever worked traversing getPhysicalPath TTW, maybe it was patched recently.

If this is the problem, you can provide a getPhysicalPath view that "proxies" it.

A security patch in CMFPlone removes the doc string from getPhysicalPath and various other methods that you should not be able to visit on a url:

As workaround, you could temporarily disable this patch during the migration.

1 Like

Hi @alert @mauritsvanrees

I disable this path for make the migration

Thanks you guys!

Plone Foundation Code of Conduct