oowekyala / citegraph Goto Github PK
View Code? Open in Web Editor NEWA citation network explorer
License: MIT License
A citation network explorer
License: MIT License
This issue can be reproduced by running this command:
bin/citegraph CorpusID:3959685
Python version used: Python 3.8.2 (default, Jul 16 2020, 14:00:26)
Traceback (most recent call last):
File "/home/dylan/Documents/tryzone/citegraph/src/citegraph/semapi.py", line 20, in _tupled_sort
elt = next(it)
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/dylan/Documents/tryzone/citegraph/src/citegraph/__main__.py", line 142, in <module>
main(args, parser.error)
File "/home/dylan/Documents/tryzone/citegraph/src/citegraph/__main__.py", line 120, in main
graph = create_graph(seeds=seeds, biblio=bibdata, params=params, db=db)
File "/home/dylan/Documents/tryzone/citegraph/src/citegraph/semapi.py", line 233, in __exit__
raise exc_val
File "/home/dylan/Documents/tryzone/citegraph/src/citegraph/__main__.py", line 120, in main
graph = create_graph(seeds=seeds, biblio=bibdata, params=params, db=db)
File "/home/dylan/Documents/tryzone/citegraph/src/citegraph/explore.py", line 249, in smart_fetch
roots = [resp for id in seeds for resp in [db.fetch_from_id(id)] if resp or not handle_api_failure(id, None)]
File "/home/dylan/Documents/tryzone/citegraph/src/citegraph/explore.py", line 249, in <listcomp>
roots = [resp for id in seeds for resp in [db.fetch_from_id(id)] if resp or not handle_api_failure(id, None)]
File "/home/dylan/Documents/tryzone/citegraph/src/citegraph/semapi.py", line 175, in fetch_from_id
result = self.__update_db(response=paper_dict)
File "/home/dylan/Documents/tryzone/citegraph/src/citegraph/semapi.py", line 149, in __update_db
return self.__paper_from_db(internal_id, True)
File "/home/dylan/Documents/tryzone/citegraph/src/citegraph/semapi.py", line 70, in __paper_from_db
authors=self.__authors_from_db(internal_id))
File "/home/dylan/Documents/tryzone/citegraph/src/citegraph/semapi.py", line 101, in __authors_from_db
return [Person(tup[0]) for tup in _tupled_sort(self.dbconn.execute("SELECT Authors.name, AuthorLinks.rank FROM Authors INNER JOIN AuthorLinks ON AuthorLinks.authorId = Authors.id WHERE AuthorLinks.paperId=?", (internal_id,)))]
File "/home/dylan/Documents/tryzone/citegraph/src/citegraph/semapi.py", line 101, in <listcomp>
return [Person(tup[0]) for tup in _tupled_sort(self.dbconn.execute("SELECT Authors.name, AuthorLinks.rank FROM Authors INNER JOIN AuthorLinks ON AuthorLinks.authorId = Authors.id WHERE AuthorLinks.paperId=?", (internal_id,)))]
RuntimeError: generator raised StopIteration
Hey oowekyala, hope you are doing well!
I have wanted to reuse your tool lately but I ran into an exception while trying to use it.
I have installed all the dependencies to their latest released versions.
It looks like semanticscholar got its API changed... here is the traceback:
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/gageotd/Documents/workspace/citegraph/src/citegraph/main.py", line 142, in
main(args, parser.error)
File "/home/gageotd/Documents/workspace/citegraph/src/citegraph/main.py", line 118, in main
with PaperDb(bibdata=bibdata, dbfile=db_loc) as db:
File "/home/gageotd/Documents/workspace/citegraph/src/citegraph/semapi.py", line 230, in exit
raise exc_val
File "/home/gageotd/Documents/workspace/citegraph/src/citegraph/main.py", line 120, in main
graph = create_graph(seeds=seeds, biblio=bibdata, params=params, db=db)
File "/home/gageotd/Documents/workspace/citegraph/src/citegraph/explore.py", line 249, in smart_fetch
roots = [resp for id in seeds for resp in [db.fetch_from_id(id)] if resp or not handle_api_failure(id, None)]
File "/home/gageotd/Documents/workspace/citegraph/src/citegraph/explore.py", line 249, in
roots = [resp for id in seeds for resp in [db.fetch_from_id(id)] if resp or not handle_api_failure(id, None)]
File "/home/gageotd/Documents/workspace/citegraph/src/citegraph/semapi.py", line 163, in fetch_from_id
paper_dict: Dict = semanticscholar.paper(paper_id)
AttributeError: module 'semanticscholar' has no attribute 'paper'. Did you mean: 'Paper'?
I "fixed" it by setting semanticscholar version to 0.2.1 in DEPENDENCIES
, which might be a good workaround for the moment.
Dylan
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.