question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[KED-1749] `fsspec.filesystem` doesn't (reliably) expose `pathsep` property

See original GitHub issue

Description

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 kedro or kedro -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:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
lorenabalancommented, Jun 30, 2020

Closing this as resolved, will be be available in the next release. 😃

0reactions
DmitriiDeriabinQBcommented, Jun 19, 2020

@saludes Yes, that was clear from your comment. Let me make the issue title less confusing 🙂

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found