AuthorizeNet / sdk-python

Python SDK for the Authorize.Net API
Other
53 stars 82 forks source link

Issue with importing requests from pip #129

Closed rafaeljuzwiak closed 6 years ago

rafaeljuzwiak commented 6 years ago

Hi. So, I am having some issues with the SDK, specifically when I try to perform some request.

The error I get is "AttributeError: module 'pip._vendor.requests' has no attribute 'Session'" I took a look around and I found some topics saying that was fixed in release 1.1.0, however I just downloaded the SDK 1.1.0 and I still get the same error.

Under the PIP repository here in github, there is an user that does dev to the PIP repo states "We do not support for importing internal components of pip in your own program. You should be including requests in your requirements directly if you need to use it. For details see the pip docs. You should report this issue to the authors of authorizenet." Reference: https://github.com/pypa/pip/issues/5267#issuecomment-381963381

9 months ago I had to download the lib and modify the authorizenet sdk files myself in order to get working, I just removed the import from the pip._venders.requests library and add the import of requests directly, (import requests) that fixed the issue. However, now that you guys updated the lIbrary, I have to perform the update again, and in the future when you guys update I still need to update manually.

It would be great to just have the version in PIP working fine. Is there a reason why you guys are still doing the import for the lib requests from pip._vendors instead of doing the import of requests directly?

Kind regards, Rafael Juzwiak

rafaeljuzwiak commented 6 years ago

Oh, I went back to do the update manually and I see that you guys already changed that. So, not sure what is causing that...

The code I am running is the same as provided in the API docs page, the sample python code.

rafaeljuzwiak commented 6 years ago

Forget it, sorry, I think that was python cache.