Closed gogaz closed 6 years ago
After applying this commit I have the following stack-trace:
File "C:\Users\...\pull.py", line 14, in <module>
APIClient = clashroyale.OfficialAPI(settings.ROYALE_API_KEY, timeout=30)
File "C:\Users\...\venv\lib\site-packages\clashroyale\official_api\client.py", line 104, in __init__
with open(Path(__file__).parent.parent.joinpath('constants.json'), encoding='utf8') as f:
TypeError: invalid file: WindowsPath('C:/Users/.../venv/lib/site-packages/clashroyale/constants.json')
I was finally able to use OfficialAPI with this line:
with Path(__file__).parent.parent.joinpath('constants.json').open(encoding='utf8') as f:
I am running Python3.5.4 on Windows 10 and am getting an error when trying to use OfficialAPI, stack-trace below :