braintree / braintree_python

Braintree Python library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
241 stars 155 forks source link

Module fails on import #133

Closed vlsd closed 3 years ago

vlsd commented 3 years ago

General information

Issue description

I cannot import the python module. This is the output:

import braintree

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
~/projects/sandbox/braintree.py in 
----> 2 import braintree

~/projects/sandbox/braintree.py in 
      3 import braintree
      4 
----> 5 gateway = braintree.BraintreeGateway(
      6   braintree.Configuration(
      7     environment=braintree.Environment.Production,

AttributeError: partially initialized module 'braintree' has no attribute 'BraintreeGateway' (most likely due to a circular import)
vlsd commented 3 years ago

Never mind, I was being dumb, I had a file called braintree.py in that same folder, hence the circular import