wardbradt / peregrine

Detects arbitrage opportunities across 131 cryptocurrency exchanges in 50 countries
MIT License
1.18k stars 339 forks source link

No such file or directory issue #35

Closed guldam closed 6 years ago

guldam commented 6 years ago

when I run

from peregrinearb import get_opportunity_for_market import asyncio opportunity = asyncio.get_event_loop().run_until_complete(get_opportunity_for_market('BTC/USD'))

I receive

Traceback (most recent call last): File "", line 1, in File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete return future.result() File "/usr/local/lib/python3.6/site-packages/peregrinearb/async_find_opportunities.py", line 61, in get_opportunity_for_market finder = OpportunityFinder(ticker, exchanges=exchanges, name=name) File "/usr/local/lib/python3.6/site-packages/peregrinearb/async_find_opportunities.py", line 16, in init exchanges = get_exchanges_for_market(market_name) File "/usr/local/lib/python3.6/site-packages/peregrinearb/utils/general.py", line 24, in get_exchanges_for_market with open('./../peregrinearb/collections/collections.json') as f: FileNotFoundError: [Errno 2] No such file or directory: './../peregrinearb/collections/collections.json'

What should I do? I Installed all the modules peregrinearb required.

wardbradt commented 6 years ago

Hi, I will look into fixing this. I know the cause right now.

For future reference, could you please submit Python errors as preformatted text? It makes them much easier to read and avoids markdown errors (such as __init__ becoming a bold init). Also, I recommend downloading the latest update of Peregrine. (This bug is not fixed, but some others are)

wardbradt commented 6 years ago

This has been fixed. See: https://github.com/wardbradt/peregrine/commit/2673acfff417ec8bf1cb970a5a645fea339e76de