SharpBit / brawlstats

(A)sync python wrapper for the Brawl Stars API
https://brawlstats.rtfd.io/
MIT License
99 stars 24 forks source link

It looks like the file is not found. #34

Closed raluvy95 closed 5 years ago

raluvy95 commented 5 years ago

Describe the bug When I installed developer version and I tried to run my Discord bot, it gets an error:

Traceback (most recent call last):
  File "C:\Users\USER\AppData\Local\Programs\Python\Python36\lib\site-packages\discord\ext\commands\bot.py", line 580, in _load_from_module_spec
    setup(self)
  File "C:\Users\USER\Desktop\developer\bestbot\cogs\brawl.py", line 148, in setup
    bot.add_cog(BrawlStars(bot))
  File "C:\Users\USER\Desktop\developer\bestbot\cogs\brawl.py", line 19, in __init__
    self.client = brawlstats.Client('API KEY', is_async=True)
  File "C:\Users\USER\AppData\Local\Programs\Python\Python36\lib\site-packages\brawlstats\core.py", line 62, in __init__
    self.api = API(options.get('base_url'))
  File "C:\Users\USER\AppData\Local\Programs\Python\Python36\lib\site-packages\brawlstats\utils.py", line 23, in __init__
    with open(os.path.join(path, 'constants.json')) as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\USER\\AppData\\Local\\Programs\\Python\\Python36\\lib\\site-packages\\brawlstats\\constants.json'

Additional context

Python Version: 3.6.6 brawlstats Version: 2.3.11 OS (and version): Windows 10 (Version 10.0.17134.885)

SharpBit commented 5 years ago

If you installed using git (pip install git+https://github.com/SharpBit/brawlstats), try reinstalling now. If you installed using pypi (pip install brawlstats), that shouldn't happen

raluvy95 commented 5 years ago

Hmmmm... It works.