-
Notifications
You must be signed in to change notification settings - Fork 633
can.LogReader error on opening "filename.with.too.many.dots.blf" #1210
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
Comments
I can take this issue. |
edit: my mistake, was on main not develop |
I can reproduce it on Python 3.10 @ Win 10 (not WSL, but classic installation) on suffix = "".join(s.lower() for s in pathlib.PurePath(filename).suffixes) We should probably just replace it with |
In any case, we should add a regression test for this. Strange that this never occurred ... |
Incidently, that was the case some while ago, and apparently it was changed ... (I found this PR (#895) while compiling the new changelog.) Git blame revealed that #1138 eventually changed it in order to detect files like So maybe the fix is not as simple, but it should still be fairly straightforward to fix, I guess. |
We could replace |
@felixdivo took a first pass at this in #1221 -- let's continue the discussion there. |
Thanks @Tbruno25 for tackling this! |
This bug this I have introduced 👎 is also affecting the See https://github.com/hardbyte/python-can/blob/develop/can/io/logger.py#L88 |
Describe the bug
in python3 repl
To Reproduce
Open a log file with more then one period in it.
Expected behavior
The file should be opened as a blf file
If the file is renamed to "test.blf" the conversion works properly
Additional context
OS and version: Ubuntu20.04 in WSL
Linux TL0213507 4.4.0-19041-Microsoft #1237-Microsoft Sat Sep 11 14:32:00 PST 2021 x86_64 x86_64 x86_64 GNU/Linux
Python version: python 3.8.10
python-can version: python develop commit 2e24af0
The text was updated successfully, but these errors were encountered: