Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
TypeError: can't use a string pattern on a bytes-like object #14
Received the above error when trying to run dupReport.py.
Stack trace and logifile are below.
The subject line of the email message that caused it to blow up was automatically generated by a FOSCAM IP camera.
I am not sure what the "b" is on the front of the subject line that reads,
I suspect that something funky is encoded into the byte stream of the subject line and perhaps needs to be filtered out / converted into a processable byte stream?
Any help would be greatly appreciated!
A quick update.
The issue is specific to the subject line I identified above. I moved that message out of the inbox and the report ran successfully.
A change that somehow properly processes those types of messages would be very helpful, as I don't have 100% control of when they get generated.
Just to be sure I am clear, the email message in question is not from Duplicati, but from another process that sends email to your inbox? Thus it should get processed as "Not a message of interest" (but it's crashing instead)?
Just want to make sure I'm looking in the proper area of code.
Also, which version of dupReport are you running (check with -V option)? If you're on 1.0.2, can you run with the -v2 option? If on the beta branch (1.0.3), run with the -v3 option. Either way, can you run it again with the bad email in place and post the last 30 or so lines of the log file?
Thanks for the quick response!
You are correct -- this is an email that should be processed as "Not a message of interest".
-V option provides the following:
Here is a link to the tail end of the logfile produced by running with the "-v2" option.
Marc, I just uploaded a new version of 2.0.3 on the beta branch. Please download that and run with the -v3 option and see if that works. I think I've addressed the issue, but I'm not that familiar with different email encoding schemes. If this doesn't work I'll have to do some more research.