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]SyntaxWarning: invalid escape sequence '\.' #401

Open
Lieta2 opened this issue Jan 21, 2025 · 5 comments
Open

[Bug]SyntaxWarning: invalid escape sequence '\.' #401

Lieta2 opened this issue Jan 21, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@Lieta2
Copy link

Lieta2 commented Jan 21, 2025

Describe the issue

2025-01-21 11:46:11.835 WARNING (ImportExecutor_0) [py.warnings] /config/custom_components/mikrotik_router/coordinator.py:1584: SyntaxWarning: invalid escape sequence '\.'

How to reproduce the issue

Start homeassistant.

Expected behavior

No warning

Software versions

  • Home Assistant version: 2025.1.3
  • Mikrotik Router integration version: master branch commit 339b01d
  • Mikrotik Hardware: RBD25G-5HPacQD2HPnD
  • RouterOS version: 7.17rc3

Traceback/Error logs

2025-01-21 11:46:11.835 WARNING (ImportExecutor_0) [py.warnings] /config/custom_components/mikrotik_router/coordinator.py:1584: SyntaxWarning: invalid escape sequence '\.'
  version = re.sub("[^0-9\.]", "", full_version[0:split_end])
@Lieta2 Lieta2 added the bug Something isn't working label Jan 21, 2025
@zvldz
Copy link

zvldz commented Jan 21, 2025

double escaping is required

version = re.sub("[^0-9\\.]", "", full_version[0:split_end])

@tomaae
Copy link
Owner

tomaae commented Jan 22, 2025

double escaping is required

version = re.sub("[^0-9\\.]", "", full_version[0:split_end])

Does your error disappear when you apply this?

@Lieta2
Copy link
Author

Lieta2 commented Jan 22, 2025

Yes.

Copy link

github-actions bot commented Feb 6, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale label Feb 6, 2025
@Lieta2
Copy link
Author

Lieta2 commented Feb 6, 2025

Not stale.

@github-actions github-actions bot removed the stale label Feb 7, 2025
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

No branches or pull requests

3 participants