You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
Activity
VitalyErmilov commentedon Sep 20, 2019
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