Skip to content

Conversation

@mariam851
Copy link

Hi @ageron,

This PR fixes the PermissionError reported in issue #213, which occurs when the Jupyter environment (specifically within Docker or restricted Linux/Windows directories) lacks write permissions to create the datasets folder.

Changes and Improvements:
Graceful Error Handling: Wrapped the directory creation and download logic in a try-except block. Instead of a crash, the user now receives a clear instruction on how to resolve the permission issue.

Python 3.12+ Compatibility: Added filter='data' to tarfile.extractall(). This resolves the DeprecationWarning regarding the change in default extraction behavior in future Python versions, making the notebook more future-proof.

Verified Robustness: * Simulated permission denials on Windows using icacls to ensure the exception is caught correctly.

Verified the "Success Path" to ensure data is still downloaded and loaded correctly when permissions are available.

Ran local tests using pytest to validate both scenarios.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant