gordienko-dmitry / TikTokPy

python TikTok client
25 stars 4 forks source link

ImportError: attempted relative import with no known parent package #1

Closed fhartavi closed 5 years ago

fhartavi commented 5 years ago

Traceback (most recent call last): File "/Users/fhartavi/Desktop/tiktok2/tiktokpy/example.py", line 1, in import tiktokpy File "/Users/fhartavi/Desktop/tiktok2/tiktokpy/tiktokpy.py", line 3, in from . import api ImportError: attempted relative import with no known parent package

gordienko-dmitry commented 5 years ago

Replace example.py from "tiktokpy/" directory in "/Users/fhartavi/Desktop/tiktok2/"

fhartavi commented 5 years ago

Traceback (most recent call last): File "/Users/fhartavi/Desktop/tiktok2/example.py", line 4, in username = os.environ['besoxur'] File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/os.py", line 678, in getitem raise KeyError(key) from None KeyError: 'besoxur'

gordienko-dmitry commented 5 years ago

make sure, that you set your environment variables You can read about it https://en.wikipedia.org/wiki/Environment_variable

fhartavi commented 5 years ago

Wikipedia in Turkey blocked if you help me I will be very happy 15-20 days I tried all python tiktok library I can't start working pls don't broken me and help me dear.

Thanks to you for this big library.

gordienko-dmitry commented 5 years ago

maybe it can help https://www.twilio.com/blog/2017/01/how-to-set-environment-variables.html and this tiktok package like beta project, like prototype now, I've just starting to develop it