Closed Bro3x closed 4 years ago
Issue-Label Bot is automatically applying the label bug
to this issue, with a confidence of 0.80. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
Hi @Bro3x
I had the same problem, a temporary fix is to roll back to version 3.3.9 by running pip3 uninstall tiktokapi
then pip3 install TikTokApi==3.3.9
Cheers,
Alex.
hopefully should be fixed by this release
Sorry, but the error is still there in 3.4.1 I tried 3.3.9 but got the "Browser closed unexpectedly" error. (all fixes from #95 applied)
I have the same problem in 3.4.1: 'browser' object has no attribute 'timezone_name'
Not sure if this affects it, but I also installed chromium-driver: https://github.com/davidteather/TikTok-Api/issues/95#issuecomment-673789306 And now it's running fine
@AlexVerrico No effect here:
apt install chromium-driver
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'chromium-chromedriver' instead of 'chromium-driver'
chromium-chromedriver is already the newest version (83.0.4103.97-0ubuntu0.20.04.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
@Bro3x Not sure if it makes a difference, but I'm running python 3.7 not 3.8
@AlexVerrico Tried 3.7.0 and 3.7.3 with no effect:
File "/root/.pyenv/versions/3.7.0/lib/python3.7/site-packages/TikTokApi/tiktok.py", line 24, in __init__ self.timezone_name = self.__format_new_params__(b.timezone_name)
AttributeError: 'browser' object has no attribute 'timezone_name'
I have the same problem sometimes (using python 3.6)
Update didn't help :(
I just made some changes to the nightly branch can you download the code and run setup.py and tell me if that fixes your issue?
I just made some changes to the nightly branch can you download the code and run setup.py and tell me if that fixes your issue?
This is what I get
Also happening on python 3.8.3 (which probably surprises noone). On mac, haven't installed chromium or anything separately.
Will also try the nightly branch.
update: nightly branch works for me! Can do
>>> from TikTokApi import TikTokApi
>>> api = TikTokApi()
[W:pyppeteer.chromium_downloader] start chromium download.
Download may take a few minutes.
But when I try to actually do soemthing:
>>> results = 10
>>>
>>> trending = api.trending(count=results)
[W:pyppeteer.chromium_downloader] start chromium download.
Download may take a few minutes.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/michaelhoyle/miniconda3/envs/pixacollect2/lib/python3.8/site-packages/TikTokApi/tiktok.py", line 114, in trending
res = self.getData(api_url, b, proxy=proxy)
File "/Users/michaelhoyle/miniconda3/envs/pixacollect2/lib/python3.8/site-packages/TikTokApi/tiktok.py", line 55, in getData
"&verifyFp=" + b.verifyFp + \
AttributeError: 'browser' object has no attribute 'verifyFp'
So that's another missing attribute? Control is returned to the python shell pretty much immediately after it prints the 'downloading chromium' message, so maybe it's not acquiring the browser properly?
also have bug
Python 3.8.2 (default, Jul 16 2020, 14:00:26) ubuntu 20 x 64
[W:pyppeteer.chromium_downloader]
chromium download done.
Traceback (most recent call last):
File "tt.py", line 6, in
@vitsh1974 Try doing this
I had similar problems and it solved them for me.
Still have an error in v3.4.3 (Ubuntu 18.04 (Vagrant), python3.6):
Traceback (most recent call last): File "../python/scripts/TikTok/get_tiktok_by_id.py", line 5, in
api = TikTokApi() File "/home/vagrant/python_virt_env/lib/python3.6/site-packages/TikTokApi/tiktok.py", line 24, in init self.timezone_name = self.format_new_params(b.timezone_name) AttributeError: 'browser' object has no attribute 'timezone_name' Error in atexit._run_exitfuncs: Traceback (most recent call last): File "/home/vagrant/python_virt_env/lib/python3.6/site-packages/pyppeteer/launcher.py", line 151, in _close_process self._loop.run_until_complete(self.killChrome()) File "/usr/lib/python3.6/asyncio/base_events.py", line 460, in run_until_complete self._check_closed() File "/usr/lib/python3.6/asyncio/base_events.py", line 377, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed sys:1: RuntimeWarning: coroutine 'Launcher.killChrome' was never awaited
i'm run
++++++++++++++++++++++
from pyppeteer.launcher import Launcher
print(' '.join(Launcher().cmd)) # prints the command used to launch pyppeteer
++++++++++++++++++++++
bdmin@ubuntu:~/Desktop/tt$ python3 tt.py
[W:pyppeteer.chromium_downloader] start chromium download.
Download may take a few minutes.
100%|█████████████████████████████████████████████████████████████████████████████████████████| 193/193 [00:00<00:00, 607277.32it/s]
[W:pyppeteer.chromium_downloader]
chromium download done.
Traceback (most recent call last):
File "tt.py", line 2, in
dmin@ubuntu:~/Desktop/tt$ chromedriver -v ChromeDriver 84.0.4147.105 (a6b12dfad6663f13a7e16e9a42a6a4975374096b-refs/branch-heads/4147@{#943}) bdmin@ubuntu:~/Desktop/tt$
Can not run the application:
File "/usr/local/lib/python3.8/dist-packages/TikTokApi/tiktok.py", line 24, in init self.timezone_name = self.format_new_params(b.timezone_name)
AttributeError: 'browser' object has no attribute 'timezone_name' nor the following attributes.
Ubuntu 20 TikTokApi-3.4.0 Python 3.8.2
Requirement already satisfied: pyppeteer in /usr/local/lib/python3.8/dist-packages (from TikTokApi) (0.2.2) Requirement already satisfied: selenium in /usr/local/lib/python3.8/dist-packages (from TikTokApi) (3.141.0) Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from TikTokApi) (2.22.0) Requirement already satisfied: urllib3<2.0.0,>=1.25.8 in /usr/lib/python3/dist-packages (from pyppeteer->TikTokApi) (1.25.8) Requirement already satisfied: appdirs<2.0.0,>=1.4.3 in /usr/local/lib/python3.8/dist-packages (from pyppeteer->TikTokApi) (1.4.4) Requirement already satisfied: pyee<8.0.0,>=7.0.1 in /usr/local/lib/python3.8/dist-packages (from pyppeteer->TikTokApi) (7.0.2) Requirement already satisfied: tqdm<5.0.0,>=4.42.1 in /usr/local/lib/python3.8/dist-packages (from pyppeteer->TikTokApi) (4.48.2) Requirement already satisfied: websockets<9.0,>=8.1 in /usr/local/lib/python3.8/dist-packages (from pyppeteer->TikTokApi) (8.1)