Cannot unpickle DocumentNode
See original GitHub issueReporting issues with GraphQL-core 3
Unpickling of DocumentNode(s) fail since unpickling a FrozenList fails. I believe the root issue is that List is extended, and pickle assumes it may call append, resulting in a FrozenError.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Cannot unpickle some data just pickled with python 3 with a ...
Pickling un pickling goes fine until the bit of code tagged "ADDING THIS CODE CAUSES PROBLEM" is inserted. In this case I get...
Read more >Python HTML Support - Computer Hope
This is a read-only attribute. Node.parentNode, The parent of the current node, or None for the document node. The value is always a...
Read more >13.7.1 DOM Objects - Python 2.4 Documentation
With no argument, the XML header does not specify an encoding, and the result is Unicode string if the default encoding cannot represent...
Read more >sphinx-all command man page - python3-sphinx | ManKier
Note that the term cannot have more than one line of text. ... pickle files this pickle file requires that the sphinx package...
Read more >Oracle® Database - XML C API Reference
document node */ ... XML document node ... (with XmlDomSetPIData), but the target is required and cannot be changed. Note the.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This has now been solved in b9423b74ca9d22d009a1a4633b38b2bcd06c604b by using tuples instead of FrozenLists for lists of nodes, and by not pickling the Token links, as explained above. Will be available in v3.2.0rc4.
@corydolphin I like to move this forward, but I have limited time, so I would be glad if you or anybody else could help.
The first thing we need is a test that makes sure that document asts can be properly pickled and unpickled. So I added this at the bottom of
test_schema_parser.py:This test fails due to the
FrozenErrorissue and passes if we replace the FrozenLists with an ordinary list.However, it baffles me that I had to set
sys.setrecursionlimit(2000)to make it pass, otherweise I get a RecursionError. Thekitchen_sinkdocument is actually not that complicated or deeply nested. Does anybody understand what’s going on here?