JetBrains-Research / pubtrends

Scientific literature explorer. Runs a Pubmed or Semantic Scholar search and allows user to explore high-level structure of result papers
Apache License 2.0
36 stars 2 forks source link

TypeError in SS search #258

Closed olegs closed 3 years ago

olegs commented 3 years ago

[2021-04-28 17:00:20,851: ERROR/ForkPoolWorker-2] Task analyze_search_terms[955a95f4-76d8-4a61-adbf-7663c306b444] raised unexpected: TypeError("int() argument must be a string, a bytes-like object or a number, not 'NoneType'") Traceback (most recent call last): File "/home/user/miniconda3/envs/pubtrends/lib/python3.8/site-packages/celery/app/trace.py", line 385, in trace_task R = retval = fun(*args, *kwargs) File "/home/user/miniconda3/envs/pubtrends/lib/python3.8/site-packages/celery/app/trace.py", line 650, in __protected_call__ return self.run(args, **kwargs) File "/home/user/pysrc/celery/tasks_main.py", line 27, in analyze_search_terms ids = expand_ids( File "/home/user/pysrc/papers/analysis/expand.py", line 37, in expand_ids mesh_stems, mesh_counter = estimate_mesh(ids, loader) File "/home/user/pysrc/papers/analysis/expand.py", line 107, in estimate_mesh publications = loader.load_publications(ids) File "/home/user/pysrc/papers/db/ss_postgres_loader.py", line 117, in load_publications return Loader.process_publications_dataframe(ids, pub_df) File "/home/user/pysrc/papers/db/loader.py", line 90, in process_publications_dataframe pub_df['year'] = pub_df['year'].apply(int) File "/home/user/miniconda3/envs/pubtrends/lib/python3.8/site-packages/pandas/core/series.py", line 3848, in apply mapped = lib.map_infer(values, f, convert=convert_dtype) File "pandas/_libs/lib.pyx", line 2329, in pandas._libs.lib.map_infer TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'