sendsay-ru / sendsay-api-python

The client library to support Sendsay API
https://sendsay.ru
9 stars 14 forks source link

ModuleNotFoundError: No module named 'exceptions' #1

Open Kokozzi opened 4 years ago

Kokozzi commented 4 years ago

Full lib seems to be broken because of incorrect modules imports:

>>> from sendsay.api import SendsayAPI                                                                                 
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/.../.venv/lib/python3.7/site-packages/sendsay/api.py", line 8, in <module>
    from exceptions import SendsayAPIError
ModuleNotFoundError: No module named 'exceptions'

Tested with Python 3.7.5, Ubuntu 18.04.3 LTS.

hezymal commented 4 years ago

Same problem:

Traceback (most recent call last):
  File ".\index.py", line 2, in <module>
    from sendsay.api import SendsayAPI
  File "C:\Program Files (x86)\Python38-32\lib\site-packages\sendsay\api.py", line 8, in <module>
    from exceptions import SendsayAPIError
ModuleNotFoundError: No module named 'exceptions'
Kokozzi commented 4 years ago

After direct message to SendSay support they mentioned, that it's only python2 lib. It won't work with python3.

hezymal commented 4 years ago

Enough to fix the import of exceptions in api.py to work on python3:

from .exceptions import SendsayAPIError // add dot "." before "exceptions"
feikeker commented 4 years ago

same issue Traceback (most recent call last): File "E:\02 Python 基础\练习代码\word.py", line 2, in <module> from docx import Document File "C:\Users\admin\anaconda3\lib\site-packages\docx.py", line 30, in <module> from exceptions import PendingDeprecationWarning ModuleNotFoundError: No module named 'exceptions'

Vaishalinicky commented 3 years ago

root@aeb4686b140b:/tmp# python3 Python 3.8.10 (default, Jun 2 2021, 10:49:15) [GCC 9.4.0] on linux Type "help", "copyright", "credits" or "license" for more information.

import cql Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.8/dist-packages/cql/init.py", line 17, in from cql.apivalues import * File "/usr/local/lib/python3.8/dist-packages/cql/apivalues.py", line 17, in import exceptions ModuleNotFoundError: No module named 'exceptions'

same issue even i have

Luferov commented 2 months ago

oh god this is sad