[KED-1749] `fsspec.filesystem` doesn't (reliably) expose `pathsep` property
See original GitHub issueDescription
Cannot save a list of figures
Steps to Reproduce
On kedro ipython:
from kedro.extras.datasets.matplotlib import MatplotlibWriter
import matplotlib.pyplot as plt
lp = MatplotlibWriter(filepath='mab_list')
plots = []
for i in range(5):
plots.append(plt.figure())
plt.plot([1,2,3], [4,5,6+i])
plt.close()
lp.save(plots)
Expected Result
Create a folder named mab_list with 5 PNG files.
Actual Result
DataSetError: Failed while saving data to data set MatplotlibWriter(filepath=mab_list, protocol=file).
'LocalFileSystem' object has no attribute 'pathsep'
Fix
I just changed .pathsep by .sep in line:
https://github.com/quantumblacklabs/kedro/blob/32180557299a196b82a7d1ad7bf93d94627e1a3e/kedro/extras/datasets/matplotlib/matplotlib_writer.py#L169
Your Environment
Include as many relevant details about the environment in which you experienced the bug:
- Kedro version used (
pip show kedroorkedro -V): Version: 0.16.1 - Python version used (
python -V): Python 3.8.3 - Operating system and version: mcOS Catalina 10.15.5
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
[KED-1749] `fsspec.filesystem` doesn't (reliably) expose ...
We confirm that we aware of that and the fix will be available in the next release. Surprisingly, pathsep property 'magically' appears in...
Read more >API Reference — fsspec 2022.11.0+13.g0974514.dirty ...
Given a path or paths, return a list of OpenFile objects. For writing, a str path must contain the “*” character, which will...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Closing this as resolved, will be be available in the next release. 😃
@saludes Yes, that was clear from your comment. Let me make the issue title less confusing 🙂