SOLVED: Broken tutorial: Getting started with the LSST Science Pipelines

Hi,

I’m trying to run the tutorial for the LSST Science pipelines and have trouble following these instructions:

Getting started tutorial part 1: setting up the Butler data repository — LSST Science Pipelines

Namely the command:

git clone -b v25_0_1 GitHub - lsst/rc2_subset: A small subset of the RC2 dataset for running DRP

fails with the error:

fatal: Remote branch v25_0_1 not found in upstream origin

and if I ignore the branch and proceed I get the following error when trying to initialize butler:

Failed to instantiate Butler from config file:///home/viitanen/tutorial_lsst_pipelines/rc2_subset/SMALL_HSC/butler.yaml.
Traceback (most recent call last):
File “/home/viitanen/mambaforge/envs/lsst-scipipe-5.0.1/lib/python3.10/site-packages/sqlalchemy/engine/base.py”, line 1910, in _execute_context
self.dialect.do_execute(
File “/home/viitanen/mambaforge/envs/lsst-scipipe-5.0.1/lib/python3.10/site-packages/sqlalchemy/engine/default.py”, line 736, in do_execute
cursor.execute(statement, parameters)
sqlite3.DatabaseError: file is not a database

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “”, line 1, in
File “/home/viitanen/mambaforge/envs/lsst-scipipe-5.0.1/share/eups/Linux64/daf_butler/ga7f022ee40+2007041a77/python/lsst/daf/butler/_butler.py”, line 282, in init
self.registry = Registry.fromConfig(
File “/home/viitanen/mambaforge/envs/lsst-scipipe-5.0.1/share/eups/Linux64/daf_butler/ga7f022ee40+2007041a77/python/lsst/daf/butler/registry/_registry.py”, line 230, in fromConfig
return registry_cls.fromConfig(config, butlerRoot, writeable, defaults)
File “/home/viitanen/mambaforge/envs/lsst-scipipe-5.0.1/share/eups/Linux64/daf_butler/ga7f022ee40+2007041a77/python/lsst/daf/butler/registries/sql.py”, line 207, in fromConfig
managers = managerTypes.loadRepo(database)
File “/home/viitanen/mambaforge/envs/lsst-scipipe-5.0.1/share/eups/Linux64/daf_butler/ga7f022ee40+2007041a77/python/lsst/daf/butler/registry/managers.py”, line 242, in loadRepo
with database.declareStaticTables(create=False) as context:
File “/home/viitanen/mambaforge/envs/lsst-scipipe-5.0.1/lib/python3.10/contextlib.py”, line 135, in enter
return next(self.gen)
File “/home/viitanen/mambaforge/envs/lsst-scipipe-5.0.1/share/eups/Linux64/daf_butler/ga7f022ee40+2007041a77/python/lsst/daf/butler/registry/interfaces/_database.py”, line 678, in declareStaticTables
context = StaticTablesContext(self, connection)
File “/home/viitanen/mambaforge/envs/lsst-scipipe-5.0.1/share/eups/Linux64/daf_butler/ga7f022ee40+2007041a77/python/lsst/daf/butler/registry/interfaces/_database.py”, line 118, in init
self._tableNames = frozenset(self._inspector.get_table_names(schema=self._db.namespace))
File “/home/viitanen/mambaforge/envs/lsst-scipipe-5.0.1/lib/python3.10/site-packages/sqlalchemy/engine/reflection.py”, line 266, in get_table_names
return self.dialect.get_table_names(
File “”, line 2, in get_table_names
File “/home/viitanen/mambaforge/envs/lsst-scipipe-5.0.1/lib/python3.10/site-packages/sqlalchemy/engine/reflection.py”, line 55, in cache
ret = fn(self, con, *args, **kw)
File “/home/viitanen/mambaforge/envs/lsst-scipipe-5.0.1/lib/python3.10/site-packages/sqlalchemy/dialects/sqlite/base.py”, line 1993, in get_table_names
rs = connection.exec_driver_sql(s)
File “/home/viitanen/mambaforge/envs/lsst-scipipe-5.0.1/lib/python3.10/site-packages/sqlalchemy/engine/base.py”, line 1770, in exec_driver_sql
return self._exec_driver_sql(
File “/home/viitanen/mambaforge/envs/lsst-scipipe-5.0.1/lib/python3.10/site-packages/sqlalchemy/engine/base.py”, line 1674, in _exec_driver_sql
ret = self._execute_context(
File “/home/viitanen/mambaforge/envs/lsst-scipipe-5.0.1/lib/python3.10/site-packages/sqlalchemy/engine/base.py”, line 1953, in _execute_context
self.handle_dbapi_exception(
File “/home/viitanen/mambaforge/envs/lsst-scipipe-5.0.1/lib/python3.10/site-packages/sqlalchemy/engine/base.py”, line 2134, in handle_dbapi_exception
util.raise
(
File “/home/viitanen/mambaforge/envs/lsst-scipipe-5.0.1/lib/python3.10/site-packages/sqlalchemy/util/compat.py”, line 211, in raise

raise exception
File “/home/viitanen/mambaforge/envs/lsst-scipipe-5.0.1/lib/python3.10/site-packages/sqlalchemy/engine/base.py”, line 1910, in _execute_context
self.dialect.do_execute(
File “/home/viitanen/mambaforge/envs/lsst-scipipe-5.0.1/lib/python3.10/site-packages/sqlalchemy/engine/default.py”, line 736, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.DatabaseError: (sqlite3.DatabaseError) file is not a database
[SQL: SELECT name FROM sqlite_master WHERE type=‘table’ ORDER BY name]
(Background on this error at: Error Messages — SQLAlchemy 1.4 Documentation)

For installing the LSST Science Pipelines I followed the instructions here:

Install with lsstinstall and eups distrib — LSST Science Pipelines

and verified that the issue is not due to git LFS, i.e. running the final git clone here Configuring Git LFS for downloading LSST data packages — LSST Science Pipelines finishes without errors.

Best,
-akke

This error almost always means that the file was not downloaded properly from LFS. What size is it? It is a small file with some text in it pointing at a LFS object?

The problem was indeed with LFS. After including the credentials, one needs to run

git lfs install

in order to complete the initialization. This information is currently missing from the setup instruction Configuring Git LFS for downloading LSST data packages — LSST Science Pipelines

After running the command above, the tutorial seems to work.

2 Likes