linuxmint / linuxmint/nemo-extensions
[nemo-media-columns] Fix NameError: name 'gfile' is not defined in update_cb
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 486
- Forks
- 172
- PR merge metrics
- No merged PRs in 30d
Description
Description
In nemo-media-columns.py, inside the update_cb method, there is a typo when handling the stopit.TimeoutException exception. The print statement attempts to access gfile.get_uri(), but the parameter passed to update_cb is named file.
This causes a NameError crash when a file processing timeout occurs:
Traceback (most recent call last):
File ".../nemo-media-columns.py", line 168, in update_cb
with stopit.ThreadingTimeout(self.timeout):
...
stopit.utils.TimeoutException
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ".../nemo-media-columns.py", line 171, in update_cb
print("nemo-media-columns failed to process '%s' within a reasonable amount of time" % (gfile.get_uri(), e))
NameError: name 'gfile' is not defined. Did you mean: 'file'?
Steps to Reproduce
Trigger a timeout during media file processing (e.g., set timeout to a low value or process a large video file that exceeds the timeout threshold).
Observe the terminal output when stopit.TimeoutException is caught.
Expected Behavior
It should log the message using file.get_uri() without raising a NameError.
Proposed Fix
Line 171 in nemo-media-columns/nemo-media-columns.py:
Change gfile.get_uri() to file.get_uri().
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open nemo-media-columns/nemo-media-columns.py and inspect update_cb around line 171, especially the stopit.TimeoutException handler. Trigger or review the timeout path and verify the error message uses the update_cb parameter named file without raising a NameError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 92/100