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

The library doesn't work #8

Open
ghost opened this issue Apr 12, 2018 · 1 comment
Open

The library doesn't work #8

ghost opened this issue Apr 12, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 12, 2018

After installation I get an ImportError:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/vagrant/2checkout-python/twocheckout/__init__.py", line 1, in <module>
    from sale import Sale
ImportError: No module named 'sale'

The complete file structure is not correct if I look into __init__.py, because there are only python files in the twocheckout folder and no other folders like here:

from sale import Sale
from api_request import Api
from util import Util
from passback import Passback
from ins import Notification
from product import Product
from option import Option
from coupon import Coupon
from contact import Contact
from company import Company
from charge import Charge
from payment import Payment
from error import TwocheckoutError

So If I then cd 2checkout-python/twocheckout and do the import twocheckout from there it works, but then gives me errors in the further work process:
AttributeError: module 'twocheckout' has no attribute 'Api'

What should I do? I am using python3 and I have installed it as described here:
Or is this instruction wrong? Because there is no difference to the python2 instruction?

Please advise

@VitalyErmilov
Copy link

Hi, looks like you are using 'twocheckout' folder from python 2 branch. You should use 3. branch instead:
https://github.com/2Checkout/2checkout-python/tree/3.x

It helped me to resolve the similar problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant