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

Plex: SyntaxWarning: invalid escape sequence '\.' """ #114471

Closed
casakampa opened this issue Mar 30, 2024 · 18 comments · Fixed by #114581 or #117712
Closed

Plex: SyntaxWarning: invalid escape sequence '\.' """ #114471

casakampa opened this issue Mar 30, 2024 · 18 comments · Fixed by #114581 or #117712

Comments

@casakampa
Copy link

The problem

After upgrading from 2024.4.b0 to b1, and from b1 to b3 (I skipped b1 > b2), I get this error in my logs:

Logger: py.warnings
Bron: components/plex/server.py:10
Eerst voorgekomen: 09:14:39 (1 gebeurtenissen)
Laatst gelogd: 09:14:39

/usr/local/lib/python3.12/site-packages/plexapi/base.py:158: SyntaxWarning: invalid escape sequence '\.' """ Load the specified key to find and build all items with the specified tag

The strange thing is, I don't use plex in home assistant, nor have I added it in the past.

What version of Home Assistant Core has the issue?

core-2024.4.0b0

What was the last working version of Home Assistant Core?

core-2024.3.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Plex

Link to integration documentation on our website

https://www.home-assistant.io/integrations/plex/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: py.warnings
Bron: components/plex/server.py:10
Eerst voorgekomen: 09:14:39 (1 gebeurtenissen)
Laatst gelogd: 09:14:39

/usr/local/lib/python3.12/site-packages/plexapi/base.py:158: SyntaxWarning: invalid escape sequence '\.' """ Load the specified key to find and build all items with the specified tag

Additional information

I only joined the beta channel to update core, supervisor and operating system are stable releases.

@home-assistant
Copy link

Hey there @jjlawren, mind taking a look at this issue as it has been labeled with an integration (plex) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of plex can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign plex Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


plex documentation
plex source
(message by IssueLinks)

@hmmbob
Copy link
Contributor

hmmbob commented Mar 30, 2024

Also seeing this on beta 3. Also, just as casakampa, I'm not even using Plex....

@jjlawren
Copy link
Contributor

This is harmless, but an issue in an underlying library's docstring. It's fixed in that library's repo but no release has been published yet. I'll take care of that soon.

@jjlawren
Copy link
Contributor

Although I'm not sure what is triggering this warning. I can't reproduce in my dev environment.

@hmmbob
Copy link
Contributor

hmmbob commented Mar 30, 2024

Although I'm not sure what is triggering this warning. I can't reproduce in my dev environment.

I've only seen it happening just at boot

@hmmbob
Copy link
Contributor

hmmbob commented Apr 3, 2024

Still happening on beta 7:

/usr/local/lib/python3.12/site-packages/plexapi/base.py:174: SyntaxWarning: invalid escape sequence '\d' """ Load the specified key to find and build all items with the specified tag

@joostlek can you reopen this issue? It has not been solved.

@joostlek
Copy link
Member

joostlek commented Apr 3, 2024

Let me double check if we want to have these issues tracked in core or that we just want people to create this at the library itself.

A lot of libraries aren't maintained as well, so then it doesn't make sense for people to keep open an issue in this issue tracker while we can't really solve it.

@hmmbob
Copy link
Contributor

hmmbob commented Apr 3, 2024

Let me double check if we want to have these issues tracked in core or that we just want people to create this at the library itself.

A lot of libraries aren't maintained as well, so then it doesn't make sense for people to keep open an issue in this issue tracker while we can't really solve it.

There are more, similar issues tagged for the milestone

@joostlek
Copy link
Member

joostlek commented Apr 3, 2024

I know, but that's why I want to know how we want to handle all these issues in general. I also have some warnings in my own log, so if all those warnings got an issue, it might be overkill, so I am asking some questions how we want to handle these

@jjlawren
Copy link
Contributor

jjlawren commented Apr 3, 2024

I see where the issue is, one invalid escape sequence in the library's docstring remains. We can reopen this one for now.

@hmmbob
Copy link
Contributor

hmmbob commented Apr 20, 2024

Just a small note that I still have the warning on 2024.4.3

2024-04-19 17:11:18.529 WARNING (ImportExecutor_0) [py.warnings] /usr/local/lib/python3.12/site-packages/plexapi/base.py:174: SyntaxWarning: invalid escape sequence '\d' """ Load the specified key to find and build all items with the specified tag

@Joo01
Copy link

Joo01 commented May 3, 2024

Warning can also be seen in HA 2024.5.1

2024-05-03 18:41:35.878 WARNING (ImportExecutor_0) [py.warnings] /usr/local/lib/python3.12/site-packages/plexapi/base.py:183: SyntaxWarning: invalid escape sequence '\d' """ Load the specified key to find and build all items with the specified tag

@BreiteSeite
Copy link

Also present in HA 2024.5.2.

Also i don't have the plex integration active/running AFAIK. So i'm wondering, why i get this warning at all. Shouldn't this be lazy-loaded?

@cdce8p
Copy link
Member

cdce8p commented May 8, 2024

Also present in HA 2024.5.2.

It likely needs pkkid/python-plexapi#1404 which hasn't been released yet.

@Masterz69
Copy link

Reported on HA Core 2024.5.3:

Logger: py.warnings
Source: components/plex/server.py:10
First occurred: 11:34:30 (1 occurrences)
Last logged: 11:34:30

/usr/local/lib/python3.12/site-packages/plexapi/base.py:183: SyntaxWarning: invalid escape sequence '\d' """ Load the specified key to find and build all items with the specified tag

@casakampa
Copy link
Author

Unfortunately, the warning appeared again after upgrading to core-2024.5.5 on multiple installations.

@hmmbob
Copy link
Contributor

hmmbob commented May 26, 2024

Lol, I was just arriving here to report the same. Error still there on 2025.5.5

Logger: py.warnings
Bron: components/plex/server.py:10
Eerst voorgekomen: 10:07:15 (1 gebeurtenissen)
Laatst gelogd: 10:07:15

/usr/local/lib/python3.12/site-packages/plexapi/base.py:183: SyntaxWarning: invalid escape sequence '\d' """ Load the specified key to find and build all items with the specified tag

@ytugarev
Copy link

+1. Needs to be reopened

@github-actions github-actions bot locked and limited conversation to collaborators Jun 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants