0

我运行以下 hvplot 代码,

from hvplot.sample_data import us_crime
columns = ['Burglary rate', 'Larceny-theft rate', 'Robbery rate', 'Violent Crime rate']
us_crime.plot.violin(y=columns, group_label='Type of crime', value_label='Rate per 100k', invert=True)

但是得到没有这样的文件或目录错误,有人知道可能是什么问题吗?谢谢

FileNotFoundError                         Traceback (most recent call last)
<ipython-input-30-6e0bc6b3a875> in <module>
----> 1 from hvplot.sample_data import us_crime
      2 
      3 columns = ['Burglary rate', 'Larceny-theft rate', 'Robbery rate', 'Violent Crime rate']
      4 
      5 

/opt/conda/lib/python3.7/site-packages/hvplot/sample_data.py in <module>
     19 
     20 # Load catalogue
---> 21 catalogue = open_catalog(_cat_path)
     22 
     23 # Add catalogue entries to namespace

/opt/conda/lib/python3.7/site-packages/intake/__init__.py in open_catalog(uri, **kwargs)
    160         raise ValueError('Unknown catalog driver (%s), supply one of: %s'
    161                          % (driver, list(sorted(registry))))
--> 162     return registry[driver](uri, **kwargs)
    163 
    164 

/opt/conda/lib/python3.7/site-packages/intake/catalog/local.py in __init__(self, path, autoreload, **kwargs)
    550         self.autoreload = autoreload  # set this to False if don't want reloads
    551         self.filesystem = kwargs.pop('fs', None)
--> 552         super(YAMLFileCatalog, self).__init__(**kwargs)
    553 
    554     def _load(self, reload=False):

/opt/conda/lib/python3.7/site-packages/intake/catalog/base.py in __init__(self, name, description, metadata, auth, ttl, getenv, getshell, persist_mode, storage_options, *args)
    111         self.updated = time.time()
    112         self._entries = self._make_entries_container()
--> 113         self.force_reload()
    114 
    115     @classmethod

/opt/conda/lib/python3.7/site-packages/intake/catalog/base.py in force_reload(self)
    168     def force_reload(self):
    169         """Imperative reload data now"""
--> 170         self._load()
    171         self.updated = time.time()
    172 

/opt/conda/lib/python3.7/site-packages/intake/catalog/local.py in _load(self, reload)
    575             self._dir = get_dir(self.path)
    576 
--> 577             with file_open as f:
    578                 text = f.read().decode()
    579             if "!template " in text:

/opt/conda/lib/python3.7/site-packages/fsspec/core.py in __enter__(self)
    100         mode = self.mode.replace("t", "").replace("b", "") + "b"
    101 
--> 102         f = self.fs.open(self.path, mode=mode)
    103 
    104         self.fobjects = [f]

/opt/conda/lib/python3.7/site-packages/fsspec/spec.py in open(self, path, mode, block_size, cache_options, **kwargs)
    934                 autocommit=ac,
    935                 cache_options=cache_options,
--> 936                 **kwargs
    937             )
    938             if not ac:

/opt/conda/lib/python3.7/site-packages/fsspec/implementations/local.py in _open(self, path, mode, block_size, **kwargs)
    115         if self.auto_mkdir and "w" in mode:
    116             self.makedirs(self._parent(path), exist_ok=True)
--> 117         return LocalFileOpener(path, mode, fs=self, **kwargs)
    118 
    119     def touch(self, path, **kwargs):

/opt/conda/lib/python3.7/site-packages/fsspec/implementations/local.py in __init__(self, path, mode, autocommit, fs, **kwargs)
    197         self.autocommit = autocommit
    198         self.blocksize = io.DEFAULT_BUFFER_SIZE
--> 199         self._open()
    200 
    201     def _open(self):

/opt/conda/lib/python3.7/site-packages/fsspec/implementations/local.py in _open(self)
    202         if self.f is None or self.f.closed:
    203             if self.autocommit or "w" not in self.mode:
--> 204                 self.f = open(self.path, mode=self.mode)
    205             else:
    206                 # TODO: check if path is writable?

FileNotFoundError: [Errno 2] No such file or directory: '/opt/conda/lib/python3.7/site-packages/hvplot/../examples/datasets.yaml'
ERROR   
Took 1 sec. Last updated by anonymous at March 12 2021, 12:11:24 PM.
4

0 回答 0