When I assign a new sharing permission level to any user,
I get this error
It seems that any folder or user produces this error. There are some users with sharing permissions already, which means this used to work before. I'm not sure what happened from then until now that changed this.
Have any of you encountered this problem before?
Error log :
Traceback (innermost last):
Module ZPublisher.Publish, line 115, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 41, in call_object
Module Products.CMFCore.FSPythonScript, line 108, in __call__
Module Shared.DC.Scripts.Bindings, line 311, in __call__
Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
Module Products.CMFCore.FSPythonScript, line 164, in _exec
Module None, line 14, in folder_localrole_edit
- <FSPythonScript at /intranet/folder_localrole_edit used for /intranet/service-areas/management-services>
- Line 14
Module <string>, line 4, in _facade
Module Products.Hotfix_20070320, line 68, in _curried
Module Products.CMFCore.MembershipTool, line 437, in setLocalRoles
Module Products.Archetypes.CatalogMultiplex, line 70, in reindexObjectSecurity
Module Products.ZCatalog.CatalogBrains, line 52, in _unrestrictedGetObject
Module OFS.Traversable, line 187, in unrestrictedTraverse
- __traceback_info__: (['mailer', 'formfolder.2009-03-22.3253705634', 'FormFolder', 'portal_factory'], 'one-melville-brand-update-2009-1')
Module Products.Five.traversable, line 126, in __bobo_traverse__
AttributeError: one-melville-brand-update-2009-1
It seems like your portal_catalog tool is inconsistent.
This means you have catalog entries (brain), with no real content (Archetype object).
You can solve this by "Clear and Rebuild" your catalog.
http://localhost:8080/${PATH_TO_PLONE}/portal_catalog/manage_catalogAdvanced -> Clear and rebuilt.
This action can take long time, depending on how many content you have.
Short explanation what seems to happen in your case:
After changing the local roles on a specific object, Plone tries to reindex the security relevant portal catalog indexes on the object itself and on all subobjects. While reindexing the subcontent it tries to get some data of a inexistent object (AttributeError while traversal).
With a fresh catalog you can avoid such errors.
Related
in order to develop my script in an external IDE, I'm trying to automatically reload a text in blender when it is modified from outside of Blender. I think I've got the idea of how it works, but there must be one tiny detail that completely blocks me from achieving my goal.
My script is the following:
import bpy
import sys
ctx = bpy.context.copy()
for area in ctx['screen'].areas:
if area.type == 'TEXT_EDITOR':
textEditor = area
for text in bpy.data.texts:
if text.name == 'main.py':
textEditor.spaces[0].text = text
bpy.ops.text.reload()
Output:
>>> exec(bpy.data.texts['reload.py'].as_string())
Traceback (most recent call last):
File "<blender_console>", line 1, in <module>
File "<string>", line 13, in <module>
File "/Applications/Blender.app/Contents/Resources/3.3/scripts/modules/bpy/ops.py", line 113, in __call__
ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.text.reload.poll() failed, context is incorrect
I cannot get what part of the context is correct. I found no solution on the Internet, even the doc recommends reading the source code to understand what might be the cause of this error, but I couldn't find it anyway in the source code.
Can someone tell me what I am missing here please?
I am using a third-party module in Odoo to do mass label printing (https://www.odoo.com/apps/modules/12.0/label/) and despite the fact that the module claims to be compatible with version 12, I am getting server errors when trying to run the pdf rendering:
Odoo Server Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1677, in report_download
response = self.report_routes(reportname, converter=converter, **dict(data))
File "/usr/lib/python3/dist-packages/odoo/http.py", line 517, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1614, in report_routes
pdf = report.with_context(context).render_qweb_pdf(docids, data=data)[0]
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_actions_report.py", line 677, in render_qweb_pdf
html = self.with_context(context).render_qweb_html(res_ids, data=data)[0]
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_actions_report.py", line 710, in render_qweb_html
data = self._get_rendering_context(docids, data)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_actions_report.py", line 723, in _get_rendering_context
data.update(report_model._get_report_values(docids, data=data))
AttributeError: 'report.label.report_label' object has no attribute '_get_report_values'
Screenshot:
It may be an error related to the change of some Odoo version (or not, I don’t really know).
Does anyone know if this attribute exist? I haven’t been able to find this information in the Odoo documentation (it doesn’t seem very complete regarding these topic).
Here are some screenshots of the configurations I’m using:
Thank you for your help!
From the traceback you shared on first screenshot, the problem seems to be with report_model variable which is reference to report.label.report_label object, defined in label/report/dunamic_model.py file which contains the method get_report_values. But from odoo 12 community code, ir.actions.report is looking for _get_report_values, the mismatch between this two method name is actually causing the problem.
can anybody help me with this code?
if i run this code with pyretic, the pyretic will says
File "/home/ibrahim/pyretic/pyretic.py", line 313, in <module>
main()
File "/home/ibrahim/pyretic/pyretic.py", line 191, in main
module = import_module(module_name)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/ibrahim/pyretic/pyretic/examples/kshortestpathpyretic.py", line 58
distances[node_start]=0
^
IndentationError: unindent does not match any outer indentation level
What s wrong with this code if i run this codewith pyretic
the image is the result if i run this code with pyretic controller
as the error messages said, You need to correct the indentation (tab between blocks) in the python source code.
I can't see your code as the link is not available.
Using rest API, I am connecting Redmine with Python Script and Populating the data in the ODOO.
In Redmine assigned_to value in issue is empty i.e NULL, while Reading those value.
Traceback (most recent call last):
File "/home/vignesh/PycharmProjects/vignesh/vigred.py", line 23, in <module>
redmine_asssigned_to = id.assigned_to
File "/usr/local/lib/python2.7/dist-packages/python_redmine-1.5.1-py2.7.egg/redmine/resources.py", line 424, in __getattr__
return super(Issue, self).__getattr__(item)
File "/usr/local/lib/python2.7/dist-packages/python_redmine-1.5.1-py2.7.egg/redmine/resources.py", line 193, in __getattr__
return self._action_if_attribute_absent()
File "/usr/local/lib/python2.7/dist-packages/python_redmine-1.5.1-py2.7.egg/redmine/resources.py", line 294, in _action_if_attribute_absent
raise ResourceAttrError
redmine.exceptions.ResourceAttrError: Resource doesn't have the requested attribute
Short answer: Use getattr(id, 'assigned_to', None) instead of id.assigned_to.
Long answer: Python-Redmine raises ResourceAttrError if you're trying to access an attribute that doesn't exist. The problem here is that assigned_to may or may not exist on the resource object depending on if it is set in Redmine or not, also Python-Redmine doesn't hardcode any attributes inside itself, i.e. it gets them dynamically from Redmine, that is why you have this problem.
When trying to import some objects from my server (debian) on another machine (mac), I get this 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 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 '_dt_reconstructor'
The Zope and Python versions are exactly the same (Zope 2.13.19 and Python 2.7.3) on both machines. Re-importing on the same machine works fine.
I tracked down the object causing the problem, it is an instance of one of my custom classes. My problem is that I don't know where to look to fix the error.
One of the base classes of this class uses DateTime, but that does not cause any problems with the other classes that inherit from this base class.
Check your DateTime egg versions.
DateTime 2.12.7 added the function _dt_reconstructor, and you'll need to use at least that release in the 2.12.x series, or use version 3.0.1 or newer in the 3.0.x series to be able to unpickle DateTime instances again.
The 3.0.x series uses a much more efficient internal structure, leading to significant memory savings. However, 3.0.x DateTime code can read 2.x series pickles, but once you move to 3.x you cannot go back to 2.x as the format is not backwards compatible.