Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - TypeError when using a proxy with the byUsername function #319

Closed
Katsumend opened this issue Nov 7, 2020 · 1 comment · Fixed by #320
Closed

[BUG] - TypeError when using a proxy with the byUsername function #319

Katsumend opened this issue Nov 7, 2020 · 1 comment · Fixed by #320
Labels
bug Something isn't working

Comments

@Katsumend
Copy link

Katsumend commented Nov 7, 2020

Describe the bug

When using a proxy with the byUsername function I receive a type error and the function does not execute. I'm fairly sure this is a bug because using the exact same proxy with the bySound function works as expected. What I'm typing at the repl is:

tiktoks = api.byUsername("americanredcross", count=1, proxy=myproxy)

The buggy code

From tiktok.py:

#     def byUsername(self, username, count=30, **kwargs) -> dict:
        (
            region,
            language,
            proxy,
            minCursor,
            maxCursor,
            maxCount,
            offset,
        ) = self.__process_kwargs__(kwargs)
        data = self.getUserObject(username, proxy=proxy)
        return self.userPosts(
            data["id"],
            data["secUid"],
            count=count,
            proxy=proxy,
            language=language,
            region=region,
            **kwargs,

Expected behavior

This function returns a tiktok dictionary when used without a proxy.

Error Trace (if any)

Put the error trace below if there's any error thrown.

# Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\User\AppData\Local\Programs\Python\Python37\lib\site-packages\TikTokApi\tiktok.py", line 373, in byUsername
    **kwargs,
TypeError: userPosts() got multiple values for keyword argument 'proxy'

Desktop (please complete the following information):

  • Windows 10
  • TikTokApi-3.6.1

Additional context

Thanks so much for the API! Let me know if I'm doing something wrong.

@Katsumend Katsumend added the bug Something isn't working label Nov 7, 2020
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.98. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant