0

I have been using the Python MailJet API successfully for some time. However, I am now getting an error from that script:

Traceback (most recent call last):

File "/usr/local/sbin/mailjet.py", line 6, in from mailjet_rest import Client

File "/usr/lib/python2.7/site-packages/mailjet_rest/init.py", line 4, in from .client import Client

File "/usr/lib/python2.7/site-packages/mailjet_rest/client.py", line 11, in requests.packages.urllib3.disable_warnings() AttributeError: 'module' object has no attribute 'packages'

I'm not sure what the error means but it is coming from the MailJet library when I do the import. The Requests library is installed so that can't be the problem. I know Python 2.7 is now deprecated but that is the version on which CentOS 7 depends. How do I go about debugging this since I do not have the MailJet source? TIA.

Thomas Schillaci
  • 2,348
  • 1
  • 7
  • 19
  • Could you upload the content of `/usr/lib/python2.7/site-packages/mailjet_rest/client.py` in [pastebin](https://pastebin.com/) or anything? – xxMrPHDxx Mar 02 '20 at 14:00
  • Thanks for the reply. I did not pick up on that part of the traceback. I am looking at this code now but it is MailJet code not mine. I would hate to make any changes. In any case I need some time to look at it. Particularly the line in question. 'requests.packages.urllib3.disable_warnings()' – Dennis Putnam Mar 02 '20 at 14:23
  • I'm importing it just fine. I don't know how to reproduce your issue – xxMrPHDxx Mar 02 '20 at 14:41
  • Were any of the packages you're using changed somehow? – AMC Mar 02 '20 at 18:24

0 Answers0