Skip to content

Quickstart seems broken #133

Open
Open
@koaning

Description

I am trying to get the tutorial running locally but seem to hit an issue with the first cell block.

import ibis

con = ibis.connect("duckdb://nycflights13.ddb")
con.create_table(
    "flights", ibis.examples.nycflights13_flights.fetch().to_pyarrow(), overwrite=True
)
con.create_table(
    "weather", ibis.examples.nycflights13_weather.fetch().to_pyarrow(), overwrite=True
)

When I run it I get this error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[3], line 5
      1 import ibis
      3 con = ibis.connect("duckdb://nycflights13.ddb")
      4 con.create_table(
----> 5     "flights", ibis.examples.nycflights13_flights.fetch().to_pyarrow(), overwrite=True
      6 )
      7 con.create_table(
      8     "weather", ibis.examples.nycflights13_weather.fetch().to_pyarrow(), overwrite=True
      9 )

File ~/Development/probabl/venv/lib/python3.11/site-packages/ibis/examples/__init__.py:45, in Example.fetch(self, table_name, backend)
     41     table_name = name
     43 board = _get_board()
---> 45 (path,) = board.pin_download(name)
     47 if backend.name in _DIRECT_BACKENDS:
     48     # Read directly into these backends. This helps reduce memory
     49     # usage, making the larger example datasets easier to work with.
     50     if path.endswith(".parquet"):

File [~/Development/probabl/venv/lib/python3.11/site-packages/pins/boards.py:394](http://localhost:8888/lab/tree/~/Development/probabl/venv/lib/python3.11/site-packages/pins/boards.py#line=393), in BaseBoard.pin_download(self, name, version, hash)
    376 def pin_download(self, name, version=None, hash=None) -> Sequence[str]:
    377     """Download the files contained in a pin.
    378 
    379     This method only downloads the files in a pin. In order to read and load
   (...)
    391 
    392     """
--> 394     meta = self.pin_fetch(name, version)
    396     if hash is not None:
    397         raise NotImplementedError("TODO: validate hash")

File [~/Development/probabl/venv/lib/python3.11/site-packages/pins/boards.py:188](http://localhost:8888/lab/tree/~/Development/probabl/venv/lib/python3.11/site-packages/pins/boards.py#line=187), in BaseBoard.pin_fetch(self, name, version)
    187 def pin_fetch(self, name: str, version: Optional[str] = None) -> Meta:
--> 188     meta = self.pin_meta(name, version)
    190     # TODO: sanity check caching (since R pins does a cache touch here)
    191     # path = self.construct_path([self.board, name, version])
    192     # self.fs.get(...)
   (...)
    195     #       need to ensure user can have a readable cache
    196     #       so they could pin_fetch and then examine the result, a la pin_download
    197     return meta

File [~/Development/probabl/venv/lib/python3.11/site-packages/pins/boards.py:151](http://localhost:8888/lab/tree/~/Development/probabl/venv/lib/python3.11/site-packages/pins/boards.py#line=150), in BaseBoard.pin_meta(self, name, version)
    148     selected_version = guess_version(version)
    149 else:
    150     # otherwise, get the last pin version
--> 151     versions = self.pin_versions(name, as_df=False)
    153     if not len(versions):
    154         raise NotImplementedError("TODO: sanity check when no versions")

File [~/Development/probabl/venv/lib/python3.11/site-packages/pins/boards.py:106](http://localhost:8888/lab/tree/~/Development/probabl/venv/lib/python3.11/site-packages/pins/boards.py#line=105), in BaseBoard.pin_versions(self, name, as_df)
    104 all_versions = []
    105 for full_path in versions_raw:
--> 106     version = self.keep_final_path_component(full_path)
    107     all_versions.append(guess_version(version))
    109 # sort them, with latest last

File [~/Development/probabl/venv/lib/python3.11/site-packages/pins/boards.py:635](http://localhost:8888/lab/tree/~/Development/probabl/venv/lib/python3.11/site-packages/pins/boards.py#line=634), in BaseBoard.keep_final_path_component(self, path)
    634 def keep_final_path_component(self, path):
--> 635     return path.split("[/](http://localhost:8888/)")[-1]

AttributeError: 'dict' object has no attribute 'split'

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions