WENDELIN combines Scikit Learn machine learning and NEO distributed storage for out-of-core data analytics in python
Table of Contents
When installing ERP5 you may encounter a number of issues, which are adressed here.
ImportError: No module named pytz
Install pytz python package.
OperationalError: (1153, "Got a packet bigger than 'max_allowed_packet' bytes")
Increase the value of the parameter max_allowed_packet to something bigger in your MySQL configuration. You can change it from /etc/my.cnf.
RuntimeError: tic is looping forever. These messages are pending: [('/erp5_portal_97ad677fdc3692c02e03838b9465053d/portal_simulation', 'InventoryModule_reindexMovementList', -3, 6), ...
Appears when lauching runUnitTest. The database is allready in use by other instance of zope on the server.
UnicodeDecodeError while exporting Localizer Message Catalogs
Broken message catalogs can contains unicode objects and encoded string as keys. It's supposed to contains ASCII string only. You can fix a message catalog by calling this method with the message catalog as self.
Toggle line numbers
1 def LocalizerMessageCatalog_fixUnicodeKeys(self):
2 assert self.meta_type == 'MessageCatalog'
3 message_keys = self._messages.keys()
4 for k in message_keys:
5 if isinstance(k, unicode):
6 message = self._messages.get(k.encode('utf8'),
8 del self._messages[k]
9 self._messages[k.encode('utf8')] = message
Toggle line numbers
assert self.meta_type == 'MessageCatalog'
message_keys = self._messages.keys()
for k in message_keys:
if isinstance(k, unicode):
message = self._messages.get(k.encode('utf8'),
self._messages[k.encode('utf8')] = message
ExpatError: not well-formed (invalid token) while installing Business Template
You probably used "&" (ampersand) in a property of an object which was included in the template (like "Research & Development Department"). Don't - it is a known bug in ERP5 BT mechanism.
If the error message states that the error occurred in "line 0 column 1", and you are installing the template from url, chances are you had opened one of the xml files in Vim, and either you didn't close it (leaving .swp file), or you edited the file (which leaves a temp file). The system tries to parse all files there are, and Vim swap and temporary files cause this error.
When installing a Business Template in .bt5 format, all fields in the form are empty
This happens mostly with erp5_accounting.bt5. Some python distributions have been shipping a buggy version of tarfile module on archives with long pathnames; see this message for details.
''NoneType has not attribute isConstructionAllowed'' when trying to create or view an object
This happens when a list of allowed content types of portal type of the object you are creating has some portal types which are not installed in your site. To fix this, just go to portal_types/[your type] and click "save".
ExportError: Truncated export file in unit test while adding business templates
If you have such problem while adding business template into unit test:
Adding erp5_trade business template ... Traceback (most recent call last):
File "/home/shufla/work/erp5instance/unit_test/Products/ERP5Type/tests/ERP5TypeTestCase.py", line 619, in setupERP5Site
File "/home/shufla/work/erp5instance/Products/ERP5/Tool/TemplateTool.py", line 374, in download
bt.importFile(dir=1, file=file_list, root_path=name)
File "/home/shufla/work/erp5instance/unit_test/Products/ERP5/Document/BusinessTemplate.py", line 4652, in importFile
File "/home/shufla/work/erp5instance/unit_test/Products/ERP5/Document/BusinessTemplate.py", line 444, in importFile
File "/home/shufla/work/erp5instance/unit_test/Products/ERP5/Document/BusinessTemplate.py", line 273, in importFiles
File "/home/shufla/work/erp5instance/unit_test/Products/ERP5/Document/BusinessTemplate.py", line 579, in _importFile
obj = connection.importFile(file, customImporters=customImporters)
File "/home/shufla/erp5/lib/python/ZODB/ExportImport.py", line 77, in importFile
return customImporters[magic](self, file, clue)
File "/home/shufla/erp5/lib/python/OFS/XMLExportImport.py", line 119, in importXML
File "/home/shufla/erp5/lib/python/ZODB/ExportImport.py", line 85, in importFile
File "/home/shufla/work/erp5instance/Products/ERP5Type/patches/Transaction.py", line 96, in commit
ncommitted += self._commit_objects(objects)
File "/home/shufla/erp5/lib/python/ZODB/Transaction.py", line 356, in _commit_objects
File "/home/shufla/erp5/lib/python/ZODB/Connection.py", line 344, in commit
getattr(self, method_name)(transaction, *args, **kw)
File "/home/shufla/erp5/lib/python/ZODB/ExportImport.py", line 130, in _importDuringCommit
raise POSException.ExportError, 'Truncated export file'
You need to remove business template (.bt5 file, svn checkout) and run it again (eg. svn checkout).
/!\ Double check if you do not have any former business templates on unit test search path.
If system is raising exception AttributeError: mimetypes_registry you need MimetypesRegistry and PortalTransforms products. Those are available in Nexedi's repository as RPMs: http://www.nexedi.org/static/mandrivalinux/2007.1/i586/
and specs are available here:
Thanks to Ivan Tyagov.
Pending activities are not processed, nothing in logs
- question 1: did you change the port on which your Zope is running?
The portal_activities tool has load balancing feature - a node is a host and port; by default, it is "127.0.0.1:[port]", both distributing node and processing node. This is set on bootstrap; if you change port, the system tries to use the old one. You can fix it easily on portal_activities/manageLoadBalancing tab.
No documents are generated (eg. Sale Packing List from Sale Order)
That's because not enough Simulation Movements are created. Go to portal_rules and there validate rules. After validation expand simulations in portal_simulation - new movements will be created. Ref: rules upgrade note.
"AttributeError: _getOb" when installing business template
This happens when ERP5 is trying to install contained objects of an object which shouldn't contain any objects (e.g. controls (fields) within a Python Script). There may be some junk left in business template source code, if you did lots of renaming and deleting objects and something was not properly removed from repository.
To fix it, check what is "container" and "object_id" when it fails and have a look at the source code of your business template - chances are you will find a file named "SomeThing.xml" defining a Python Script, and in the same directory a subdirectory "SomeThing/" containg some other xml files. Delete the subdirectory.
Scripts are executed by Anonymous User (and fail authorization) even though You are logged in as zope
This happens when there are many 'zope' users (Managers defined in root acl_users folder) during site developement and then one of them is deleted. All scripts that were owned by this deleted user will be executed with Anonymous role.
The solution is either to recreate the user (easier) or take ownership of all owned by the deleted user objects (hard since we never know which ones those are)
TypeError: sequence item 236: expected string, NoneType found when trying to build a business template
This happens when you input some national characters into a Zope Page Template. Only ASCII chars are allowed there; if you want national chars, type it in english and use Localizer to translate. In other words:
<p>Śląsk jest piękny</p>
<p i18n:translate=" " i18n:domain="ui">Silesia is beautiful</p>
TypeError while accessing listboxes
If there is such problem while accessing listboxes:
Module Products.ERP5Form.ListBox, line 1633, in query
1631 | self.current_page = 0
1632 | else:
1633>| self.total_pages = int(max(self.total_size - 1, 0) /
max_lines) + 1
1634 | if start >= self.total_size:
1635 | start = max(self.total_size - 1, 0)
TypeError: unsupported operand type(s) for /: 'int' and 'NoneType'
go to preferences in portal, and activate them.
IOError: [Errno 2] No such file or directory: `/some/path/PropertySheet/SomeFile.py` , when installing business template
If instance was created using mkzopeinstance some directories aren't available. There is need to create:
directories in instance.