Getting error while generating vocabulary
See original GitHub issueHello Wengong !
Thanks for the great work !!
I am trying to get vocabulary using your dataset < ../data/polymers/all.txt >
; however, I am getting this error. I cannot figure this out. At the end I tried try-exception there but there are lots of these errors in the whole run. I will appreciate if you could assist me.
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "[...]\Anaconda3\envs\myenv\lib\multiprocessing\pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "[...]\Anaconda3\envs\myenv\lib\multiprocessing\pool.py", line 44, in mapstar
return list(map(*args))
File "[...]\hgraph2graph-master\hgraph2graph-master\generation\get_vocab.py", line 12, in process
hmol = MolGraph(s)
File "[...]\hgraph2graph-master\hgraph2graph-master\generation\poly_hgraph\mol_graph.py", line 29, in __init__
self.clusters, self.atom_cls = self.pool_clusters()
File "[...]\hgraph2graph-master\hgraph2graph-master\generation\poly_hgraph\mol_graph.py", line 87, in pool_clusters
**if fsmiles not in MolGraph.FRAGMENTS: continue**
TypeError: argument of type 'NoneType' is not iterable
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "[...]/hgraph2graph-master/generation/get_vocab.py", line 62, in <module>
vocab_list = pool.map(process, batches) # getting error here TypeError: argument of type 'NoneType' is not iterable
File "[...]\Anaconda3\envs\myenv\lib\multiprocessing\pool.py", line 266, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "[...]\Anaconda3\envs\myenv\lib\multiprocessing\pool.py", line 644, in get
raise self._value
TypeError: argument of type 'NoneType' is not iterable
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Why am I getting an error when trying to learn new words?
1. Grammar levels failing to load on official courses · 2. Empty columns on user-generated courses · 3. Inconsistencies with the learnable number ......
Read more >Vexed by Vocab: 5 Common Mistakes in Teaching New Words
Five common instructional strategies that fail to get students to effectively build their knowledge of new words.
Read more >Help Articles, Support and Frequently asked Questions
Vocabulary.com - learn new words, play games that improve your vocabulary, and find easy-to-understand definitions in our super-fast dictionary.
Read more >implement word2vec, but I got error, that word car_NOUN is in ...
I wrote the code below: to implement the word2vec on it, now im testing to get embedding for w2v_model.wv['car_NOUN'] but I get error...
Read more >Confusing English Words! Fix Your Vocabulary Errors - YouTube
Lay or Lie, Everyday or Everyday, Accept or Except, Less or Fewer, Desert or Dessert….?English has a lot of confusing words ! In...
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
Hi,
It seems that MolGraph.FRAGMENTS is not initialized. In https://github.com/wengong-jin/hgraph2graph/blob/3249f93c6e72a3cdfb0c0a71939b0f071dfe7456/generation/get_vocab.py#L50, the load_fragment function will set MolGraph.FRAGMENTS to a list of fragments collected from your training data.
This is strange because as long as load_fragment is called (get_vocab.py Line 50), MolGraph.FRAGMENTS cannot be None (at best it’s an empty list). I think the error happened before load_fragment function is called. You can try to print out fragments variable in line 49 to see whether it gets executed or not.
Hi gurus, please , I need your help. I am trying to run the get-vocab.py on my small dataset around 100. but keep getting this error as shown below: Is there a way to go around this. the reference for the error is to the mol_graph.py line82: “assert n - m <= 1 #must be connected”