peregrine icon indicating copy to clipboard operation
peregrine copied to clipboard

AttributeError: module 'ccxt.async_support' has no attribute '/'

Open ibnachraf opened this issue 5 years ago • 10 comments

Hello,

Thank you for this very useful application. But i have some issues when running, here is my stack trace:

"C:\Users\NV Master\AppData\Local\Programs\Python\Python36\python.exe" "C:/Users/NV Master/Documents/arbitrage/peregrine-master/peregrine-master/examples/example.py"
Traceback (most recent call last):
  File "C:/Users/NV Master/Documents/arbitrage/peregrine-master/peregrine-master/examples/example.py", line 5, in <module>
    opportunity = asyncio.get_event_loop().run_until_complete(get_opportunity_for_market("BTC/USD", collections_dir))
  File "C:\Users\NV Master\AppData\Local\Programs\Python\Python36\lib\asyncio\base_events.py", line 466, in run_until_complete
    return future.result()
  File "C:\Users\NV Master\Documents\arbitrage\peregrine-master\peregrine-master\peregrinearb\async_find_opportunities.py", line 324, in get_opportunity_for_market
    finder = OpportunityFinder(ticker, exchanges=exchanges, name=name)
  File "C:\Users\NV Master\Documents\arbitrage\peregrine-master\peregrine-master\peregrinearb\async_find_opportunities.py", line 52, in __init__
    exchanges = [getattr(ccxt, exchange_id)() for exchange_id in exchanges]
  File "C:\Users\NV Master\Documents\arbitrage\peregrine-master\peregrine-master\peregrinearb\async_find_opportunities.py", line 52, in <listcomp>
    exchanges = [getattr(ccxt, exchange_id)() for exchange_id in exchanges]
AttributeError: module 'ccxt.async_support' has no attribute '/'

for this example:

from peregrinearb import get_opportunity_for_market
import asyncio

collections_dir = '/Users/wardbradt/cs/peregrine/'
opportunity = asyncio.get_event_loop().run_until_complete(get_opportunity_for_market("BTC/USD", collections_dir))
print(opportunity)

what refer to collections_dir ? Otherwise other examples in the project are working fine.

thanks for your help.

ibnachraf avatar Jan 09 '20 16:01 ibnachraf

Thank you for pointing this out. This is an outdated example, which I will fix. You should not pass collections_dir to get_opportunity_for_market. So the correct code would be:

from peregrinearb import get_opportunity_for_market
import asyncio

collections_dir = '/Users/wardbradt/cs/peregrine/'
opportunity = asyncio.get_event_loop().run_until_complete(get_opportunity_for_market("BTC/USD", collections_dir))
print(opportunity)

However, I think there are some other issues impeding this snippet from running successfully. I will fix them.

wardbradt avatar Jan 11 '20 15:01 wardbradt

In the response that you have mentioned as resolution to what refer to collections_dir ? collections_dir is still being passed.Can you please tell what should be value of collections_dir ?

Shubham1605 avatar Jul 15 '20 05:07 Shubham1605

I've got the exact same issue. @wardbradt fix didn't work for me

sword134 avatar Jul 25 '20 12:07 sword134

hello friends, did any of you get the solution?

alvedys avatar Feb 20 '21 16:02 alvedys

Hello guys

I have the same issue. @wardbradt fix is actually the same as the original example.

Please help :D

massb avatar Feb 24 '21 08:02 massb

Hi everybody, any updates on how to fix it?

pratyushv9 avatar May 27 '21 07:05 pratyushv9

any solution of this error??

On May 27, 2021, at 3:46 AM, pratyushv9 @.***> wrote:

 Hi everybody, any updates on how to fix it?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

alvedys avatar May 27 '21 13:05 alvedys

@alvedys Well you can try switching to the 'working' branch and execute the example without the collections_dir parameter as the author has mentioned. But I am still getting errors for the other examples

pratyushv9 avatar May 27 '21 13:05 pratyushv9

@wardbradt I am facing this issue, can we get solution for this?

AttributeError: module 'ccxt.async_support' has no attribute '/'

dkjhaj2ee avatar May 30 '21 13:05 dkjhaj2ee

same issue here

tomekozlowski avatar Nov 09 '21 03:11 tomekozlowski