Skip to content
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

Provide more error feedback during image import in the GUI #83

Merged
merged 4 commits into from
Nov 3, 2021

Conversation

yoda-vid
Copy link
Collaborator

Errors that occur during image import have shown only limited feedback in the GUI, requiring the user to view the console or the log file to see more detailed error messages (see #82). For those using the installer version, the log file is not intuitive to locate. This PR provides more feedback in the GUI by reporting any error messages in the import feedback text area along with the path to the log file for more detailed info such as the stack trace.

A common source of import errors is importing a directory that may contain other, non-image files. This PR now simply skips individual file planes that give an error. To report the log path after errors that stop the import, the path is now stored in config after setting up the log path with any file rotation.

The logging file path is set by the user or to a default path, but either may change depending on the available path locations for the rotating file handler. Store this path in `config` so that the path can be displayed to the user.
Errors during single file import have been assumed to result from RAW files but may occur for other reasons such as unrecognized or incompatible file types. Catch any `ValueError`s, skipping the file and notifying the user. Also, change the notification for conversion to RGB to grayscale so that it appears in the GUI.
The GUI has simply notified the user when the import could not be completed but has not provided explanations for the import error. Catch global exceptions during import to notify the user of the error and point them to the log file. This notification contains the basic error, while the full stack trace is posted to the console and log file. This notification has not been added to import through the command-line since presumably the error message would be visible in the console.
@yoda-vid yoda-vid added bug Something isn't working enhancement New feature or request labels Oct 25, 2021
@yoda-vid yoda-vid added this to the v1.5.0 milestone Oct 25, 2021
@yoda-vid yoda-vid merged commit b3ba28a into master Nov 3, 2021
@yoda-vid yoda-vid deleted the import_feedback branch November 3, 2021 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant