Fails to call atm = ATM()?
See original GitHub issueOperationalError Traceback (most recent call last)
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/sqlalchemy/engine/base.py in _execute_context(self, dialect, constructor, statement, parameters, *args)
1248 self.dialect.do_execute(
-> 1249 cursor, statement, parameters, context
1250 )
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/sqlalchemy/engine/default.py in do_execute(self, cursor, statement, parameters, context)
579 def do_execute(self, cursor, statement, parameters, context=None):
--> 580 cursor.execute(statement, parameters)
581
OperationalError: database is locked
The above exception was the direct cause of the following exception:
OperationalError Traceback (most recent call last)
<ipython-input-141-90878e6be8ba> in <module>
3
4 from atm import ATM
----> 5 atm = ATM()
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/atm/core.py in __init__(self, dialect, database, username, password, host, port, query, access_key, secret_key, s3_bucket, s3_folder, models_dir, metrics_dir, verbose_metrics)
51 ):
52
---> 53 self.db = Database(dialect, database, username, host, port, query)
54 self.aws_access_key = access_key
55 self.aws_secret_key = secret_key
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/atm/database.py in __init__(self, dialect, database, username, password, host, port, query)
99
100 # create ORM objects for the tables
--> 101 self._define_tables()
102
103 def _define_tables(self):
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/atm/database.py in _define_tables(self)
506 self.Classifier = Classifier
507
--> 508 Base.metadata.create_all(bind=self.engine)
509
510 # ##########################################################################
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/sqlalchemy/sql/schema.py in create_all(self, bind, tables, checkfirst)
4302 bind = _bind_or_error(self)
4303 bind._run_visitor(
-> 4304 ddl.SchemaGenerator, self, checkfirst=checkfirst, tables=tables
4305 )
4306
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/sqlalchemy/engine/base.py in _run_visitor(self, visitorcallable, element, connection, **kwargs)
2044 ):
2045 with self._optional_conn_ctx_manager(connection) as conn:
-> 2046 conn._run_visitor(visitorcallable, element, **kwargs)
2047
2048 class _trans_ctx(object):
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/sqlalchemy/engine/base.py in _run_visitor(self, visitorcallable, element, **kwargs)
1613
1614 def _run_visitor(self, visitorcallable, element, **kwargs):
-> 1615 visitorcallable(self.dialect, self, **kwargs).traverse_single(element)
1616
1617
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/sqlalchemy/sql/visitors.py in traverse_single(self, obj, **kw)
136 meth = getattr(v, "visit_%s" % obj.__visit_name__, None)
137 if meth:
--> 138 return meth(obj, **kw)
139
140 def iterate(self, obj):
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/sqlalchemy/sql/ddl.py in visit_metadata(self, metadata)
779 create_ok=True,
780 include_foreign_key_constraints=fkcs,
--> 781 _is_metadata_operation=True,
782 )
783 else:
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/sqlalchemy/sql/visitors.py in traverse_single(self, obj, **kw)
136 meth = getattr(v, "visit_%s" % obj.__visit_name__, None)
137 if meth:
--> 138 return meth(obj, **kw)
139
140 def iterate(self, obj):
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/sqlalchemy/sql/ddl.py in visit_table(self, table, create_ok, include_foreign_key_constraints, _is_metadata_operation)
824 table,
825 include_foreign_key_constraints= # noqa
--> 826 include_foreign_key_constraints,
827 )
828 # fmt: on
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/sqlalchemy/engine/base.py in execute(self, object_, *multiparams, **params)
986 raise exc.ObjectNotExecutableError(object_)
987 else:
--> 988 return meth(self, multiparams, params)
989
990 def _execute_function(self, func, multiparams, params):
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/sqlalchemy/sql/ddl.py in _execute_on_connection(self, connection, multiparams, params)
70
71 def _execute_on_connection(self, connection, multiparams, params):
---> 72 return connection._execute_ddl(self, multiparams, params)
73
74 def execute(self, bind=None, target=None):
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/sqlalchemy/engine/base.py in _execute_ddl(self, ddl, multiparams, params)
1048 compiled,
1049 None,
-> 1050 compiled,
1051 )
1052 if self._has_events or self.engine._has_events:
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/sqlalchemy/engine/base.py in _execute_context(self, dialect, constructor, statement, parameters, *args)
1251 except BaseException as e:
1252 self._handle_dbapi_exception(
-> 1253 e, statement, parameters, cursor, context
1254 )
1255
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/sqlalchemy/engine/base.py in _handle_dbapi_exception(self, e, statement, parameters, cursor, context)
1471 util.raise_from_cause(newraise, exc_info)
1472 elif should_wrap:
-> 1473 util.raise_from_cause(sqlalchemy_exception, exc_info)
1474 else:
1475 util.reraise(*exc_info)
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/sqlalchemy/util/compat.py in raise_from_cause(exception, exc_info)
396 exc_type, exc_value, exc_tb = exc_info
397 cause = exc_value if exc_value is not exception else None
--> 398 reraise(type(exception), exception, tb=exc_tb, cause=cause)
399
400
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/sqlalchemy/util/compat.py in reraise(tp, value, tb, cause)
150 value.__cause__ = cause
151 if value.__traceback__ is not tb:
--> 152 raise value.with_traceback(tb)
153 raise value
154
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/sqlalchemy/engine/base.py in _execute_context(self, dialect, constructor, statement, parameters, *args)
1247 if not evt_handled:
1248 self.dialect.do_execute(
-> 1249 cursor, statement, parameters, context
1250 )
1251 except BaseException as e:
/anaconda/envs/azureml_py36/lib/python3.6/site-packages/sqlalchemy/engine/default.py in do_execute(self, cursor, statement, parameters, context)
578
579 def do_execute(self, cursor, statement, parameters, context=None):
--> 580 cursor.execute(statement, parameters)
581
582 def do_execute_no_params(self, cursor, statement, context=None):
OperationalError: (sqlite3.OperationalError) database is locked
[SQL:
CREATE TABLE datasets (
id INTEGER NOT NULL,
name VARCHAR(100) NOT NULL,
class_column VARCHAR(100) NOT NULL,
train_path VARCHAR(200) NOT NULL,
test_path VARCHAR(200),
description VARCHAR(1000),
n_examples INTEGER NOT NULL,
k_classes INTEGER NOT NULL,
d_features INTEGER NOT NULL,
majority NUMERIC(10, 9) NOT NULL,
size_kb INTEGER NOT NULL,
PRIMARY KEY (id)
)
]
(Background on this error at: http://sqlalche.me/e/e3q8)
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
5 Common ATM Error Codes and How to Fix Them
There are 5 common ATM error codes that you are bound to see throughout the course of your ATM ownership. We'll tell you...
Read more >ATM Error Codes - OSO ATM
ERROR CODES ERROR DESCRIPTION CORRECTIVE ACTION
20012 Receipt feed lever open. Close the feed lever on the printer.
20013 Receipt paper empty. Replenish the paper...
Read more >Unable to call ATM from within a strategy. - Forum - NinjaTrader
Hi, I have been working from the example ATM code snippet, and have the following but I am unable to get the ATM...
Read more >Hyosung error codes - International Merchant Services, Inc.
If you have questions about an error you are seeing on your ATM, or you don't see your error code listed below, we'd...
Read more >Nautilus Hyosung Error Codes - ATM Services & Solutions
Reboot ATM 2. Call your attendant. 977010, Serial port open fail, Check Cable / Device. 1030100, DEV_PIN (Key data error from host), 1....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If this helps anybody else who is struggling, I have used ATM on and off for a few years now. Running from PowerShell or Ubuntu for Windows on windows works sometimes, other times not (currently not). I am able to reliably run through PyCharm (I know - I know, using IDE’s isn’t for everybody).
These are the steps that work for me to get ATM to run on my Windows10 machines:
pip install atm
I have transferred the issue as it does not related to ATMSeer