File renaming and subfolder generation editor breaks with Python 3.7

Bug #1790278 reported by Sebastian Bayer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rapid Photo Downloader
Fix Released
High
Damon Lynch

Bug Description

When I click the 'Custom...' button in the renaming presets a popup tells me that some error occurred. I'm using Arch and if I remember correctly this happens ever since Python 3.7 is the default Python version. The error seems to be caused by nameeditor.py

Here's the part with the error, full log attached:

2018-09-01 09:28:19 ERROR excepthook.py 67: An unhandled exception occurred
2018-09-01 09:28:19 ERROR excepthook.py 68: Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/raphodo/nameeditor.py", line 397, in find_all
    raise StopIteration
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/raphodo/nameeditor.py", line 407, in highlightBlock
    for index in self.find_all(text, expression):
RuntimeError: generator raised StopIteration

2018-09-01 09:29:11 ERROR excepthook.py 67: An unhandled exception occurred
2018-09-01 09:29:11 ERROR excepthook.py 68: Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/raphodo/nameeditor.py", line 397, in find_all
    raise StopIteration
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/raphodo/nameeditor.py", line 407, in highlightBlock
    for index in self.find_all(text, expression):
RuntimeError: generator raised StopIteration

2018-09-01 09:29:11 ERROR excepthook.py 67: An unhandled exception occurred
2018-09-01 09:29:11 ERROR excepthook.py 68: Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/raphodo/nameeditor.py", line 397, in find_all
    raise StopIteration
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/raphodo/nameeditor.py", line 407, in highlightBlock
    for index in self.find_all(text, expression):
RuntimeError: generator raised StopIteration

Related branches

Revision history for this message
Sebastian Bayer (bayerse) wrote :
Revision history for this message
Damon Lynch (dlynch3) wrote :

Thanks for your bug report. Can you please describe in words what you observe when the problem occurs?

Changed in rapid:
status: New → Triaged
assignee: nobody → Damon Lynch (dlynch3)
Revision history for this message
Sebastian Bayer (bayerse) wrote :

Thanks for your quick reaction, highly appreciated.

When I click the button a popup opens saying there is some bug. I can discard it and continue to create a new preset.
The main problem is that the content of the new preset is not saved.

These are the exact steps:
* Choose 'Save New Custom Preset...'
* Enter a name
* Enter a definition
* Save
* Problem occurs: the preset is empty; I cannot use the definition I inserted previously

Revision history for this message
Damon Lynch (dlynch3) wrote :

That's helpful, thanks. I'll need to investigate what's new in Python 3.7 (I haven't had a chance to follow it). It may also have something to do with a problem in PyQt 5.11. From initially glancing at it, I cannot say.

Damon Lynch (dlynch3)
Changed in rapid:
milestone: none → 0.9.12
importance: Undecided → High
Revision history for this message
Damon Lynch (dlynch3) wrote :

Assuming you are using the AUR release, I imagine the fix should be coming fairly soon, depending on how often the AUR is updated.

summary: - Custom preset: A problem occured / nameeditor.py
+ nameeditor.py breaks with Python 3.7
summary: - nameeditor.py breaks with Python 3.7
+ File renaming and subfolder generation editor breaks with Python 3.7
Changed in rapid:
status: Triaged → Fix Committed
Revision history for this message
Sebastian Bayer (bayerse) wrote :

Thanks a lot!

Damon Lynch (dlynch3)
Changed in rapid:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.