Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'RocketMissingParamException' after upgrade in pip #20

Closed
cesarandreslopez opened this issue Apr 25, 2018 · 11 comments

Comments

@cesarandreslopez
Copy link

Hello!

After using this Python Wrapper for a while during several months without issues I find that after updating today using

pip install rocketchat_API --upgrade

I get:

File "xxxx.py", line 13, in <module>
from rocketchat_API.rocketchat import RocketChat
File "/usr/local/lib/python3.6/site-packages/rocketchat_API/rocketchat.py", line 5, in <module>
from rocketchat_API.APIExceptions.RocketExceptions import RocketConnectionException, RocketAuthenticationException, \
ImportError: cannot import name 'RocketMissingParamException'

In:
Python version: 3.6.4 (default, Dec 21 2017, 01:29:34) [GCC 6.3.0 20170516]

Same identical source code and enviroment was working till today after this upgrade.

Any tips?

@cesarandreslopez cesarandreslopez changed the title ImportError: cannot import name 'RocketMissingParamException' ImportError: cannot import name 'RocketMissingParamException' after upgrade in pip Apr 25, 2018
@jadolg
Copy link
Owner

jadolg commented Apr 26, 2018

hi @cesarandreslopez, can you share the version you updated to?

@ghost
Copy link

ghost commented Apr 27, 2018

I can confirm the exact same error with a fresh install of Version „rocketchat-API (0.6.8)”:

Traceback (most recent call last):
  File "./foobar.py", line 4, in <module>
    from rocketchat_API.rocketchat import RocketChat
  File "/usr/local/lib/python3.5/dist-packages/rocketchat_API/rocketchat.py", line 5, in <module>
    from rocketchat_API.APIExceptions.RocketExceptions import RocketConnectionException, RocketAuthenticationException, \
ImportError: cannot import name 'RocketMissingParamException' 

@cesarandreslopez
Copy link
Author

@jadolg rocketchat-API 0.6.8

@Bart274
Copy link

Bart274 commented May 2, 2018

is there any solution for this issue?

@cesarandreslopez
Copy link
Author

@Bart274 while this gets resolved on the most recent version you can do:

pip install rocketchat_API==0.6.7

@jadolg
Copy link
Owner

jadolg commented May 2, 2018

Sorry for the delay in my answer. I'm working on it but I'm having serious internet connection issues. The only thing that changed from the previous version is that I was trying to show markdown description on the new pypi so I added this line long_description_content_type="text/markdown" to setup.py and uploaded using python setup.py bdist_wheel upload.

@jadolg
Copy link
Owner

jadolg commented May 2, 2018

well, I installed the wheel on a clean environment (from my harddrive, not from internet) and seems to be working perfect. This is what's installed on the environment:

chardet==3.0.4
idna==2.6
requests==2.18.4
rocketchat-API==0.6.8
urllib3==1.22

and this is the code I tried:


from rocketchat_API.rocketchat import RocketChat

rocket = RocketChat('user', 'password')
pprint(rocket.channels_list_joined().json())

@jadolg
Copy link
Owner

jadolg commented May 2, 2018

Now I installed from internet and I'm getting the same error as you. I think this might be related with the new PyPi and the way I uploaded my package.

@jadolg
Copy link
Owner

jadolg commented May 2, 2018

Well, seems that the problem was related to the way I was packaging/uploading to new PyPi. It does not seem to be compatible with good old python setup.py bdist_wheel upload. I uploaded a new version using Twine and it's working fine for me. Can anyone confirm after installing 0.6.9 ?

@pschmitt
Copy link
Contributor

pschmitt commented May 3, 2018

0.6.9 works fine for me.

@jadolg
Copy link
Owner

jadolg commented May 3, 2018

perfect! I will close this issue then. Thanks for your cooperation and support @ALL :)

@jadolg jadolg closed this as completed May 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants