Skip to content

The library doesn't work #8

@ghost

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions