VIDA-NYU / reprozip

ReproZip is a tool that simplifies the process of creating reproducible experiments from command-line executions, a frequently-used common denominator in computational science.
https://www.reprozip.org/
BSD 3-Clause "New" or "Revised" License
302 stars 33 forks source link

sqlite3.OperationalError: no such table: processes #386

Closed yarikoptic closed 1 year ago

yarikoptic commented 1 year ago

we are getting back to https://github.com/ReproNim/reproman development where we used reprozip. Unfortunately one test started to fail with cryptic error which I hoped you might have an immediate clue about to guide us from the dark corner:

❯ REPROMAN_TESTS_SSH=1 python -m pytest -s -v -k 'test_trace_local' --tb=short --integration -v -v --pdb reproman
================================== test session starts ===================================
platform linux -- Python 3.10.7, pytest-7.2.0, pluggy-1.0.0 -- /home/yoh/proj/repronim/reproman-master/venvs/dev3/bin/python
cachedir: .pytest_cache
rootdir: /home/yoh/proj/repronim/reproman-master
collected 431 items / 430 deselected / 1 selected                                        

reproman/interface/tests/test_execute.py::test_trace_local 2022-12-15 17:46:16,881 [INFO   ] Downloading tracer... 
2022-12-15 17:46:17,868 [INFO   ] Tracer downloaded to /home/yoh/.tmp/pytest-of-yoh/pytest-349/local0/tracers/d8561c1bc528592b21c0e28d6f32c0a4/reproman_trace.gz 
2022-12-15 17:46:17,965 [INFO   ] Copied tracing artifacts under /home/yoh/.tmp/pytest-of-yoh/pytest-349/local0/traces/20221215174616-e5 
FAILED
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> traceback >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
reproman/interface/tests/test_execute.py:137: in test_trace_local
    execute("ls", ["-l"], trace=True, resref="testing-local")
reproman/interface/execute.py:354: in __call__
    out, err = cmd()
reproman/interface/execute.py:82: in __call__
    self.post_command()
reproman/interface/execute.py:256: in post_command
    write_configuration(
../../misc/reprozip/reprozip/reprozip/tracer/trace.py:388: in write_configuration
    files, inputs, outputs = get_files(conn)
../../misc/reprozip/reprozip/reprozip/tracer/trace.py:116: in get_files
    executions = proc_cursor.execute(
E   sqlite3.OperationalError: no such table: processes
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> entering PDB >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB post_mortem >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> /home/yoh/proj/misc/reprozip/reprozip/reprozip/tracer/trace.py(116)get_files()
-> executions = proc_cursor.execute(
(Pdb) l
111         files = {}
112         access_files = [set()]
113     
114         # Finds run timestamps, so we can sort input/output files by run
115         proc_cursor = conn.cursor()
116  ->     executions = proc_cursor.execute(
117             '''
118             SELECT timestamp
119             FROM processes
120             WHERE parent ISNULL
121             ORDER BY id;
remram44 commented 1 year ago

This is the error you would get if trace.sqlite3 doesn't exist in the directory where you call write_configuration() (or doesn't contain the expected data). There is no check that the file exists on the ReproZip side, so if the file is not there it will treat it as an empty database and say this too.

https://github.com/VIDA-NYU/reprozip/blob/81e3ea426007617c57a1a3be51ace4af4faf1fc3/reprozip/reprozip/tracer/trace.py#L377

Are you sure there is a valid trace.sqlite3 file in the directory?

yarikoptic commented 1 year ago

we will check -- thank you @remram44 for the pointers!

attn @asmacdo . I will close it for now, and will come back if there is need for more info ;) Cheers!