If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

HTTP.CookiesForURL broken?

czukowskiczukowski Posts: 159Members ✭✭✭

I've started getting this error recently: TypeError: get_cookies_for_url() takes exactly 3 arguments (2 given)

Sure enough, from api/networkkit.py:

  def CookiesForURL(self, url):
    """
      Returns the cookies associated with the given URL.
    """
    cookie_jar = self._context.cookie_jar
    cookies = self._core.networking.get_cookies_for_url(url, cookie_jar=cookie_jar)
    if cookies:
      return cookies
    elif cookie_jar:
      return self._core.networking.get_cookies_for_url(url)

From components/networking.py:

  def get_cookies_for_url(self, url, cookie_jar):
    if cookie_jar == None: cookie_jar = self._cookie_jar
    ...

The cookie_jar argument is required and the calling function doesn't use it .

Searching the forum has given me two really old posts with the same error message:

https://forums.plex.tv/discussion/comment/721015#Comment_721015
https://forums.plex.tv/discussion/comment/1016796#Comment_1016796

I haven't saved the previous Framework folder in order to compare changes, right now the one I have is called Plug-ins-1bf240a65. If nothing has changed in these functions above and the code has been as such since long time ago, there must have been something that has switched the code flow of my channel into the other broken if-branch (elif)...

Any ideas?

Sign In or Register to comment.