"sqlite3.OperationalError: database is locked" when running "cellphonedb database generate"
Hello !
I got an error ”sqlite3.OperationalError: database is locked‘, when running "cellphonedb database generate --user-interactions interaction_input.csv --user-interactions-only".
I tried to run it on python3.7 and 3.8 on two linux computers(Ubuntu 16 and 18), and installed different versions of cellphonedb (from v2.1.7 to v2.0.0), but it couldn’t solve this problem. It has bothered me for two days, Do you have any suggestions?
p.s.1 the interaction_input.csv is downloaded from https://github.com/Teichlab/cellphonedb-data/tree/master/data. p.s.2 The error seems to appear in “app.database_manager.database.create_all()” in the “collect_database” function.
############################################################################################
(cpdb) gaolin@gaolin://192.168.0.201/e/desktop/cellphonedb_example_data/example_data$ cellphonedb database generate --user-interactions interaction_input.csv -- user-interactions-only /home/gaolin/anaconda3/envs/cpdb/lib/python3.7/site-packages/sklearn/utils/deprecation.py:144: FutureWarning: The sklearn.cluster.k_means_ module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.cluster. Anything that cannot be imported from sklearn.cluster is now part of the private API. warnings.warn(message, FutureWarning) read local uniprot file /home/gaolin/anaconda3/envs/cpdb/lib/python3.7/site-packages/cellphonedb/src/api_endpoints/terminal_api/tools_terminal_api_endpoints/tools_terminal_commands.py:243: FutureWarning: The pandas.np module is deprecated and will be removed from pandas in a future version. Import numpy directly instead 'secreted_desc': pd.np.nan, /home/gaolin/anaconda3/envs/cpdb/lib/python3.7/site-packages/cellphonedb/src/api_endpoints/terminal_api/tools_terminal_api_endpoints/tools_terminal_commands.py:246: FutureWarning: The pandas.np module is deprecated and will be removed from pandas in a future version. Import numpy directly instead 'receptor_desc': pd.np.nan, /home/gaolin/anaconda3/envs/cpdb/lib/python3.7/site-packages/cellphonedb/src/api_endpoints/terminal_api/tools_terminal_api_endpoints/tools_terminal_commands.py:249: FutureWarning: The pandas.np module is deprecated and will be removed from pandas in a future version. Import numpy directly instead 'other_desc': pd.np.nan, /home/gaolin/anaconda3/envs/cpdb/lib/python3.7/site-packages/cellphonedb/src/api_endpoints/terminal_api/tools_terminal_api_endpoints/tools_terminal_commands.py:251: FutureWarning: The pandas.np module is deprecated and will be removed from pandas in a future version. Import numpy directly instead 'tags_reason': pd.np.nan, /home/gaolin/anaconda3/envs/cpdb/lib/python3.7/site-packages/cellphonedb/src/api_endpoints/terminal_api/tools_terminal_api_endpoints/tools_terminal_commands.py:252: FutureWarning: The pandas.np module is deprecated and will be removed from pandas in a future version. Import numpy directly instead 'tags_description': pd.np.nan, /home/gaolin/anaconda3/envs/cpdb/lib/python3.7/site-packages/cellphonedb/src/api_endpoints/terminal_api/tools_terminal_api_endpoints/tools_terminal_commands.py:253: FutureWarning: The pandas.np module is deprecated and will be removed from pandas in a future version. Import numpy directly instead 'pfam': pd.np.nan, [ ][APP][26/06/21-12:57:36][WARNING] Output directory (/192.168.0.201/e/desktop/cellphonedb_example_data/example_data/out) exist and is not empty. Result can overwrite old results [ ][APP][26/06/21-12:57:36][WARNING] Output directory (/192.168.0.201/e/desktop/cellphonedb_example_data/example_data/out) exist and is not empty. Result can overwrite old results read local ensembl file read local uniprot file /home/gaolin/anaconda3/envs/cpdb/lib/python3.7/site-packages/cellphonedb/src/core/generators/gene_generator.py:31: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy ensembl_db_filtered.dropna(inplace=True) [ ][APP][26/06/21-12:57:51][WARNING] Output directory (/192.168.0.201/e/desktop/cellphonedb_example_data/example_data/out) exist and is not empty. Result can overwrite old results [ ][APP][26/06/21-12:57:51][WARNING] Output directory (/192.168.0.201/e/desktop/cellphonedb_example_data/example_data/out) exist and is not empty. Result can overwrite old results [ ][APP][26/06/21-12:57:51][WARNING] Output directory (/192.168.0.201/e/desktop/cellphonedb_example_data/example_data/out) exist and is not empty. Result can overwrite old results [ ][APP][26/06/21-12:57:51][WARNING] Output directory (/192.168.0.201/e/desktop/cellphonedb_example_data/example_data/out) exist and is not empty. Result can overwrite old results [ ][APP][26/06/21-12:57:52][WARNING] Output directory (/192.168.0.201/e/desktop/cellphonedb_example_data/example_data/out) exist and is not empty. Result can overwrite old results [ ][CORE][26/06/21-12:57:52][INFO] Initializing SqlAlchemy CellPhoneDB Core [ ][CORE][26/06/21-12:57:52][INFO] Using custom database at /192.168.0.201/e/desktop/cellphonedb_example_data/example_data/out/cellphonedb_user_2021-06-26-12_57.db Traceback (most recent call last): File "/home/gaolin/anaconda3/envs/cpdb/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1277, in _execute_context cursor, statement, parameters, context File "/home/gaolin/anaconda3/envs/cpdb/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute cursor.execute(statement, parameters) sqlite3.OperationalError: database is locked
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/gaolin/anaconda3/envs/cpdb/bin/cellphonedb", line 8, in
] (Background on this error at: http://sqlalche.me/e/13/e3q8)