Error: Can't pickle generator
See original GitHub issueOn Windows 10, with Python 3.6.5, getting error on running
tf2_gnn_train RGCN PPI --max-epochs 10 data/ppi/
log is:
2021-06-10 18:44:04.837559: W tensorflow/core/framework/op_kernel.cc:1755] Invalid argument: TypeError: cannot pickle 'generator' object
Traceback (most recent call last):
File "C:\Users\yogesh.kulkarni\AppData\Local\Continuum\anaconda3\envs\tf2\lib\site-packages\tensorflow\python\data\ops\dataset_ops.py", line 789, in get_iterator
return self._iterators[iterator_id]
KeyError: 0
Any resolution?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:7 (1 by maintainers)
Top Results From Across the Web
TypeError: can't pickle generator objects - Stack Overflow
This is a generator. As the error says, we cannot pickle generators. Use this instead. raw_X=[] for text in data: raw_X.append ...
Read more >{TypeError} cannot pickle 'generator' object due to the context ...
When using DaskExecutor , prefect tries to pickle each task, which results in the error {TypeError} cannot pickle 'generator' object due to ...
Read more >Issue 39817: CRITICAL: TypeError: cannot pickle 'generator'
I use Windows 10 Home 1909 CRITICAL: TypeError: cannot pickle ... It's probable that the error is in your code and not in...
Read more >Pandas Groupby, TypeError: can't pickle generator object.
But unfortunately, I am getting an error saying TypeError: can't pickle generator object. Kindly advise on how I can resolve this error. Thanks...
Read more >Why you cannot pickle generators - Alexandre Vassalotti
Now if an object unsupported by pickle (e.g., a file handle, a socket, a database connection, etc) occurs in the local variables of...
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 FreeTop 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
Top GitHub Comments
I have found a temporary fix for this issue. In file graph_dataset.py, line 294, make a list out of
self.graph_batch_iterator(data_fold)
E.g. it should look like something like this:if use_worker_threads: graph_batch_iterator = lambda: DoubleBufferedIterator( list(self.graph_batch_iterator(data_fold)) )
Alternatively, disable multithreding by setting
use_worker_threads
toFalse
in line 79.I got the same error on mac(Big Sur), but it worked on Colab so for now I’m using that.