matkapi / postpy2

Postman collection runner library for python
Other
35 stars 15 forks source link

cannot import name 'postpy2' from 'postpy2.core' #2

Closed gonazmul closed 2 years ago

gonazmul commented 3 years ago

When I run following python file -

#!/usr/local/lib/python3.8
from postpy2.core import postpy2
def main():
    print("test")
    main()

I get following error -

Traceback (most recent call last):
  File "aaa.py", line 2, in <module>
    from postpy2.core import postpy2
ImportError: cannot import name 'postpy2' from 'postpy2.core' (/usr/local/lib/python3.8/site-packages/postpy2/core.py)
michael-hll commented 3 years ago

I encounter the same issue today. My python version is 3.8.1

zetc0de commented 3 years ago

try this

from postpy2.core import PostPython

gonazmul commented 3 years ago

try this

from postpy2.core import PostPython

This seems to be working but why is the readme says from postpy2.core import postpy2. Is it specific to python version or something? I was using pip3 and python version 3.9