szastupov / musicbot

Telegram Music Catalog Bot
302 stars 55 forks source link

How to fix this error #4

Closed superdima05 closed 8 years ago

superdima05 commented 8 years ago

INFO:rest:serving REST on ('0.0.0.0', 8080) WARNING:aiohttp.client:Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8 Traceback (most recent call last): File "main.py", line 24, in loop.run_until_complete(start()) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/base_events.py", line 342, in run_until_complete return future.result() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/futures.py", line 274, in result raise self._exception File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py", line 239, in _step result = coro.send(value) File "main.py", line 13, in start await bot.loop() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/aiotg/bot.py", line 215, in loop timeout=self.api_timeout File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/aiotg/bot.py", line 65, in api_call return (yield from response.json()) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/aiohttp/client_reqrep.py", line 745, in json return loads(stripped.decode(encoding)) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/init.py", line 319, in loads return _default_decoder.decode(s) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

szastupov commented 8 years ago

It's hard to tell, perhaps you provided a wrong API key? Could you put a few print() into aiotg bot.py code to see what is wrong?

superdima05 commented 8 years ago

I can send example-compose.yml

superdima05 commented 8 years ago

I'm Russia

superdima05 commented 8 years ago

Привет

superdima05 commented 8 years ago

Where this API Key?

szastupov commented 8 years ago

Ты как запускаешь бота? Скинь параметры.

superdima05 commented 8 years ago

Просто python3 main.py

superdima05 commented 8 years ago

Вот файл example-compose.yml:

superdima05 commented 8 years ago

musicbot: image: szastupov/musicbot restart: always links:

szastupov commented 8 years ago

Блин, чувак, не хочу показаться грубым но все же написано в инструкциях. Если руками запускаешь то передай через enviorment. Почитай про Bot API https://core.telegram.org/api Потом перечитай README.md бота, до полного просветления :)

superdima05 commented 8 years ago

OK

superdima05 commented 8 years ago

Но в ошибках написано про ошибки в папке Python

superdima05 commented 8 years ago

Ошибка в настройках?

superdima05 commented 8 years ago

Спасибо большое! Всё заработало надо было добавить одну комманду к боту

szastupov commented 8 years ago

👍