missing required positional arguments
"Boylan, Ross" <[email protected]>
| Newsgroups | gmane.comp.web.zope.zodb |
|---|---|
| Message-ID | <[email protected]> |
I'm having trouble pulling an instance back from the database (ZEO). It's a revision object from hglib package. My first try did not import hglib in the client; the second try did. Both got the same error; see below for fuller output.
Maybe the type in the database is defined using some kind of nested class I can't easily access, maybe tng.hglib.revision?
https://selenic.com/repo/python-hglib/file/tip/hglib/client.py defines
class revision(tuple):
def __new__(cls, rev, node, tags, branch, author, desc, date):
return tuple.__new__(cls, (rev, node, tags, branch, author, desc, date))
Fuller history:
Most of my code is in a package/module tng
In an interactive session I did
from tng import *
as well as importing ZEO and other stuff, but NOT hglib.
In the session I retrieved an object from the database, called a method on it that causes the
revision to be set (inside my module is an import hglib), and committed.
In another session I tried to read the object I just wrote. That session did from tng import *; as noted I tried with and without import hglib. Here's the error from that session:
Couldn't load state for tng.Basics.BigBatch 0x044d
Traceback (most recent call last):
File "/home/ross/.local/lib/python3.4/site-packages/ZODB-5.0.0-py3.4.egg/ZODB/Connection.py", line 757, in setstate
self._reader.setGhostState(obj, p)
File "/home/ross/.local/lib/python3.4/site-packages/ZODB-5.0.0-py3.4.egg/ZODB/serialize.py", line 622, in setGhostState
state = self.getState(pickle)
File "/home/ross/.local/lib/python3.4/site-packages/ZODB-5.0.0-py3.4.egg/ZODB/serialize.py", line 615, in getState
return unpickler.load()
TypeError: __new__() missing 6 required positional arguments: 'node', 'tags', 'branch', 'author', 'desc', and 'date'
[the entire error was printed twice for some reason]
--
You received this message because you are subscribed to the Google Groups "zodb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.