ConnectedPapers / connectedpapers-py

MIT License
19 stars 2 forks source link

Is the code working? #10

Open edwardsandoval26 opened 2 weeks ago

edwardsandoval26 commented 2 weeks ago

I was trying to test the following code copy pasting the readme (on a google colaboratory instance):

from connectedpapers import ConnectedPapersClient

DEEPFRUITS_PAPER_ID = "9397e7acd062245d37350f5c05faf56e9cfae0d6"

# TEST_TOKEN allows access ONLY to the paper with the id DEEPFRUITS_PAPER_ID
client = ConnectedPapersClient(access_token="TEST_TOKEN")
remaining_uses_count = client.get_remaining_usages_sync()
print(f"Remaining uses count: {remaining_uses_count}")
free_access_papers = client.get_free_access_papers_sync()
print(f"Free access papers: {free_access_papers}")
graph = client.get_graph_sync(DEEPFRUITS_PAPER_ID)
assert graph.graph_json.start_id == DEEPFRUITS_PAPER_ID

I tried the installation process with both commands pip install git+https://github.com/ConnectedPapers/connectedpapers-py.git pip install connectedpapers-py

Am I missing something or the library is not working yet?

image

KanHarI commented 2 weeks ago

Hi! There appear to have been some drift between the server and client code - updated the necessary routes and upgraded dependencies - now all seems to work!

Please update our library (pip install -U connectedpapers-py) and try again LMK if the issue persists

edwardsandoval26

edwardsandoval26 commented 1 week ago

Now it is working correctly, thank you very much. Looking forward to test the potential of this API.