Skip to content

[nemo-media-columns] Fix NameError: name 'gfile' is not defined in update_cb #590

Description

@AlanSonic

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().

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions