engine issueshttps://gitlab.servus.at/aura/engine/-/issues2023-06-06T21:11:39+02:00https://gitlab.servus.at/aura/engine/-/issues/123Less verbose logging when result from Steering playout endpoint cannot be parsed2023-06-06T21:11:39+02:00David TrattnigLess verbose logging when result from Steering playout endpoint cannot be parsedCurrently the Steering playout endpoint returns Error `500`. Deal with that more nicely.Currently the Steering playout endpoint returns Error `500`. Deal with that more nicely.1.0-alpha2 β βοΈπ¦ Precise PheasantDavid TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/111Flake8: Add linting for Docstrings2022-08-18T17:39:31+02:00David TrattnigFlake8: Add linting for Docstrings`docstring-convention=google``docstring-convention=google`1.0-alpha2 β βοΈπ¦ Precise PheasantDavid TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/109Remove Email Monitoring2023-06-07T13:43:23+02:00David TrattnigRemove Email MonitoringThe email notification option should be removed in favor of a real monitoring solution (e.g. meta#98+).The email notification option should be removed in favor of a real monitoring solution (e.g. meta#98+).1.0-alpha2 β βοΈπ¦ Precise PheasantDavid TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/99Rename "trackservice" module to more generic "playlog" module2023-02-09T12:01:09+01:00David TrattnigRename "trackservice" module to more generic "playlog" module1.0-alpha1 β π’π¦ Dockland DucklingDavid TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/98SQLite objects created in a thread can only be used in that same thread2023-11-24T14:57:29+01:00David TrattnigSQLite objects created in a thread can only be used in that same threadIdeas on solving that (derived from discussion in MR !11):
* A) Using Asyncio - I've created a ticket for that #97+, but considering it "nice to have" and not worth the effort just for SQLite support. Which we currently don't even need....Ideas on solving that (derived from discussion in MR !11):
* A) Using Asyncio - I've created a ticket for that #97+, but considering it "nice to have" and not worth the effort just for SQLite support. Which we currently don't even need.
* B) provide an interface for using thread-local database sessions (e.g. spawn a new database session in new threads and extend the `DB.session` interface accordingly)
* C) AFAIR most threads access the DB objects in a reading manner only. So they could be detached from the database and/or eager loaded.
* D) Getting rid of ORM and DB for caching altogether. Using the heavy foundation of a full database and ORM has historic reasons. Not long ago even Redis was part of the chain. Using it just for caching is a bit overhead IMO. We could only cache the playout API endpoint and hold the programme in memory. But that's food for thought for a later stage i guess.
Considered low-priority as we have no hard requirement for SQLite or might skip DB+ORM altogether (see #100+).
## Stacktrace
```
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 910, in run
self._target(*self._args, **self._kwargs)
File "/home/david/code/aura/engine-sumpfralle/src/events.py", line 253, in func
self.call_event("on_metadata", data)
File "/home/david/code/aura/engine-sumpfralle/src/events.py", line 148, in call_event
method(*args)
File "/home/david/code/aura/engine-sumpfralle/src/plugins/trackservice.py", line 156, in on_metadata
self.store_clock_info(data)
File "/home/david/code/aura/engine-sumpfralle/src/plugins/trackservice.py", line 213, in store_clock_info
if e.meta_data:
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/attributes.py", line 294, in __get__
return self.impl.get(instance_state(instance), dict_)
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/attributes.py", line 730, in get
value = self.callable_(state, passive)
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/strategies.py", line 759, in _load_for_state
return self._emit_lazyload(
File "<string>", line 1, in <lambda>
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/strategies.py", line 900, in _emit_lazyload
q(session)
File "/usr/lib/python3/dist-packages/sqlalchemy/ext/baked.py", line 544, in all
return list(self)
File "/usr/lib/python3/dist-packages/sqlalchemy/ext/baked.py", line 444, in __iter__
return q._execute_and_instances(context)
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 3560, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1011, in execute
return meth(self, multiparams, params)
File "/usr/lib/python3/dist-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1124, in _execute_clauseelement
ret = self._execute_context(
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1206, in _execute_context
self._handle_dbapi_exception(
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1510, in _handle_dbapi_exception
util.raise_(
File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 182, in raise_
raise exception
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line 1204, in _execute_context
context = constructor(dialect, self, conn, *args)
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 822, in _init_compiled
self.cursor = self.create_cursor()
File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line 1178, in create_cursor
return self._dbapi_connection.cursor()
File "/usr/lib/python3/dist-packages/sqlalchemy/pool/base.py", line 1000, in cursor
return self.connection.cursor(*args, **kwargs)
sqlalchemy.exc.ProgrammingError: (sqlite3.ProgrammingError) SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 140517269673536 and this is thread id 140517035734592.
[SQL: SELECT playlist_entry_metadata.artificial_id AS playlist_entry_metadata_artificial_id, playlist_entry_metadata.artificial_entry_id AS playlist_entry_metadata_artificial_entry_id, playlist_entry_metadata.artist AS playlist_entry_metadata_artist, playlist_entry_metadata.title AS playlist_entry_metadata_title, playlist_entry_metadata.album AS playlist_entry_metadata_album
FROM playlist_entry_metadata
WHERE ? = playlist_entry_metadata.artificial_entry_id]
[parameters: [{'%(140517270128672 param)s': 4}]]
(Background on this error at: http://sqlalche.me/e/13/f405)
```1.0-alpha3 β Playful Platypus βΆοΈπ¦¦David TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/93SQLite: lazy load operation of attribute 'playlist' cannot proceed2022-01-25T18:59:01+01:00David TrattnigSQLite: lazy load operation of attribute 'playlist' cannot proceedWhen running Engine with SQLite exceptions like following are thrown:
```
Exception in thread PLAY:do_play:1642780440.0:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self...When running Engine with SQLite exceptions like following are thrown:
```
Exception in thread PLAY:do_play:1642780440.0:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 1286, in run
self.function(*self.args, **self.kwargs)
File "/home/david/code/aura/engine/src/control.py", line 293, in wrapper_func
if param: self.func(param,)
File "/home/david/code/aura/engine/src/scheduling/scheduler.py", line 535, in do_play
self.logger.info(self.engine.scheduler.timeslot_renderer.get_ascii_timeslots())
File "/home/david/code/aura/engine/src/scheduling/utils.py", line 235, in get_ascii_timeslots
rest_of_playlist = active_entry.get_next_entries(False)
File "/home/david/code/aura/engine/src/scheduling/models.py", line 640, in get_next_entries
for entry in self.playlist.entries:
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/attributes.py", line 294, in __get__
return self.impl.get(instance_state(instance), dict_)
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/attributes.py", line 730, in get
value = self.callable_(state, passive)
File "/usr/lib/python3/dist-packages/sqlalchemy/orm/strategies.py", line 717, in _load_for_state
raise orm_exc.DetachedInstanceError(
sqlalchemy.orm.exc.DetachedInstanceError: Parent instance <PlaylistEntry at 0x7fd8d5b65280> is not bound to a Session; lazy load operation of attribute 'playlist' cannot proceed (Background on this error at: http://sqlalche.me/e/13/bhk3)
```1.0-alpha2 β βοΈπ¦ Precise PheasantLars KruseLars Krusehttps://gitlab.servus.at/aura/engine/-/issues/83sqlalchemy.exc.InvalidRequestError: This session is in 'prepared' state; no f...2023-11-24T14:57:26+01:00David Trattnigsqlalchemy.exc.InvalidRequestError: This session is in 'prepared' state; no further SQL can be emitted within this transactionSuddenly appeared after a 5min stream and 5min file timeslot was scheduled. Playback was not interfered.
```
2021-07-13 16:20:01,606:AuraEngine:INFO - Expanded duration of playlist entry #0 - [programme.py:512-expand_entry_duration()]
2...Suddenly appeared after a 5min stream and 5min file timeslot was scheduled. Playback was not interfered.
```
2021-07-13 16:20:01,606:AuraEngine:INFO - Expanded duration of playlist entry #0 - [programme.py:512-expand_entry_duration()]
2021-07-13 16:20:01,611:AuraEngine:INFO - Finished with fading-in 'in_filesystem_1'. - [mixer.py:369-fade_in()]
Exception in thread PLAY:do_play:1626186000.0:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 1254, in run
self.function(*self.args, **self.kwargs)
File "/home/david/Code/aura/engine/src/control.py", line 294, in wrapper_func
if param: self.func(param,)
File "/home/david/Code/aura/engine/src/scheduling/scheduler.py", line 517, in do_play
self.logger.info(self.engine.scheduler.timeslot_renderer.get_ascii_timeslots())
File "/home/david/Code/aura/engine/src/scheduling/utils.py", line 236, in get_ascii_timeslots
entries = self.preprocess_entries(rest_of_playlist, False)
File "/home/david/Code/aura/engine/src/scheduling/utils.py", line 322, in preprocess_entries
if entry.entry_start >= entry.playlist.timeslot.timeslot_end:
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/attributes.py", line 287, in __get__
return self.impl.get(instance_state(instance), dict_)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/attributes.py", line 723, in get
value = self.callable_(state, passive)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/strategies.py", line 749, in _load_for_state
return self._emit_lazyload(
File "<string>", line 1, in <lambda>
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/strategies.py", line 890, in _emit_lazyload
q(session)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/ext/baked.py", line 545, in all
return list(self)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/ext/baked.py", line 445, in __iter__
return q._execute_and_instances(context)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3502, in _execute_and_instances
conn = self._get_bind_args(
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3517, in _get_bind_args
return fn(
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3496, in _connection_from_session
conn = self.session.connection(**kw)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 1138, in connection
return self._connection_for_bind(
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 1146, in _connection_for_bind
return self.transaction._connection_for_bind(
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 409, in _connection_for_bind
self._assert_active()
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 282, in _assert_active
raise sa_exc.InvalidRequestError(
sqlalchemy.exc.InvalidRequestError: This session is in 'prepared' state; no further SQL can be emitted within this transaction.
2021-07-13 16:20:01,647:AuraEngine:INFO - Expanded duration of playlist entry #0 - [programme.py:512-expand_entry_duration()]
2021-07-13 16:20:01,674:AuraEngine:INFO - Finished fetching current programme from API (3 timeslots) - [programme.py:80-refresh()]
```1.0-alpha3 β Playful Platypus βΆοΈπ¦¦David TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/71Error "Duplicate entry for key 'timeslot_id'" due to trying to save existing ...2022-01-21T19:45:24+01:00David TrattnigError "Duplicate entry for key 'timeslot_id'" due to trying to save existing timeslotTry to schedule an timeslot before at least one schedule cycle.
```
- [control.py:387-log_commands()]
2021-01-18 17:36:32,820:AuraEngine:INFO - == start fetching new timeslots (every 30 seconds) == - [scheduler.py:105-run()]
--- Loggin...Try to schedule an timeslot before at least one schedule cycle.
```
- [control.py:387-log_commands()]
2021-01-18 17:36:32,820:AuraEngine:INFO - == start fetching new timeslots (every 30 seconds) == - [scheduler.py:105-run()]
--- Logging error ---
Traceback (most recent call last):
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1283, in _execute_context
self.dialect.do_execute(
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 590, in do_execute
cursor.execute(statement, parameters)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/cursors.py", line 250, in execute
self.errorhandler(self, exc, value)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/connections.py", line 50, in defaulterrorhandler
raise errorvalue
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/cursors.py", line 247, in execute
res = self._query(query)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/cursors.py", line 411, in _query
rowcount = self._do_query(q)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/cursors.py", line 374, in _do_query
db.query(q)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/connections.py", line 277, in query
_mysql.connection.query(self, query)
_mysql_exceptions.IntegrityError: (1062, "Duplicate entry '361' for key 'timeslot_id'")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/david/Code/aura/engine/src/scheduling/scheduler.py", line 108, in run
self.programme.refresh()
File "/home/david/Code/aura/engine/src/scheduling/programme.py", line 79, in refresh
self.timeslots = self.programme_store.store_timeslots(response)
File "/home/david/Code/aura/engine/src/scheduling/programme.py", line 291, in store_timeslots
timeslot_db = self.store_timeslot(timeslot)
File "/home/david/Code/aura/engine/src/scheduling/programme.py", line 390, in store_timeslot
timeslot_db.store(add=havetoadd, commit=True)
File "/home/david/Code/aura/engine/src/scheduling/models.py", line 77, in store
DB.session.commit()
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 1042, in commit
self.transaction.commit()
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 504, in commit
self._prepare_impl()
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 483, in _prepare_impl
self.session.flush()
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2523, in flush
self._flush(objects)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2664, in _flush
transaction.rollback(_capture_exception=True)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
compat.raise_(
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 178, in raise_
raise exception
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2624, in _flush
flush_context.execute()
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/unitofwork.py", line 422, in execute
rec.execute(self)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/unitofwork.py", line 586, in execute
persistence.save_obj(
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/persistence.py", line 239, in save_obj
_emit_insert_statements(
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/persistence.py", line 1135, in _emit_insert_statements
result = cached_connections[connection].execute(
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1020, in execute
return meth(self, multiparams, params)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1133, in _execute_clauseelement
ret = self._execute_context(
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1323, in _execute_context
self._handle_dbapi_exception(
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1517, in _handle_dbapi_exception
util.raise_(
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 178, in raise_
raise exception
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1283, in _execute_context
self.dialect.do_execute(
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 590, in do_execute
cursor.execute(statement, parameters)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/cursors.py", line 250, in execute
self.errorhandler(self, exc, value)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/connections.py", line 50, in defaulterrorhandler
raise errorvalue
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/cursors.py", line 247, in execute
res = self._query(query)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/cursors.py", line 411, in _query
rowcount = self._do_query(q)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/cursors.py", line 374, in _do_query
db.query(q)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/connections.py", line 277, in query
_mysql.connection.query(self, query)
sqlalchemy.exc.IntegrityError: (_mysql_exceptions.IntegrityError) (1062, "Duplicate entry '361' for key 'timeslot_id'")
[SQL: INSERT INTO timeslot (playlist_id, default_schedule_playlist_id, default_show_playlist_id, schedule_fallback_id, show_fallback_id, station_fallback_id, timeslot_start, timeslot_end, timeslot_id, show_id, show_name, show_hosts, funding_category, comment, languages, type, category, topic, musicfocus, is_repetition) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)]
[parameters: (None, None, 9, None, None, None, '2021-01-18T17:38:00', '2021-01-18T17:40:00', 361, 1, 'Musikprogramm', 'Musikredaktion', 'Standard', None, 'Farsi', 'Unmoderiertes Musikprogramm', '', '', '', 0)]
(Background on this error at: http://sqlalche.me/e/gkpj)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/logging/__init__.py", line 1081, in emit
msg = self.format(record)
File "/usr/lib/python3.8/logging/__init__.py", line 925, in format
return fmt.format(record)
File "/usr/lib/python3.8/logging/__init__.py", line 664, in format
record.message = record.getMessage()
File "/usr/lib/python3.8/logging/__init__.py", line 369, in getMessage
msg = msg % self.args
TypeError: not enough arguments for format string
Call stack:
File "/home/david/.vscode/extensions/ms-python.python-2020.12.424452561/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey.py", line 916, in __call__
ret = self.original_func(*self.args, **self.kwargs)
File "/usr/lib/python3.8/threading.py", line 890, in _bootstrap
self._bootstrap_inner()
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/home/david/Code/aura/engine/src/scheduling/scheduler.py", line 115, in run
self.logger.critical(SU.red(f"Unhandled error while fetching & scheduling new programme! ({str(e)})"), e)
Message: '\x1b[31mUnhandled error while fetching & scheduling new programme! ((_mysql_exceptions.IntegrityError) (1062, "Duplicate entry \'361\' for key \'timeslot_id\'")\n[SQL: INSERT INTO timeslot (playlist_id, default_schedule_playlist_id, default_show_playlist_id, schedule_fallback_id, show_fallback_id, station_fallback_id, timeslot_start, timeslot_end, timeslot_id, show_id, show_name, show_hosts, funding_category, comment, languages, type, category, topic, musicfocus, is_repetition) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)]\n[parameters: (None, None, 9, None, None, None, \'2021-01-18T17:38:00\', \'2021-01-18T17:40:00\', 361, 1, \'Musikprogramm\', \'Musikredaktion\', \'Standard\', None, \'Farsi\', \'Unmoderiertes Musikprogramm\', \'\', \'\', \'\', 0)]\n(Background on this error at: http://sqlalche.me/e/gkpj))\x1b[0m'
Arguments: (IntegrityError('(_mysql_exceptions.IntegrityError) (1062, "Duplicate entry \'361\' for key \'timeslot_id\'")'),)
--- Logging error ---
Traceback (most recent call last):
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1283, in _execute_context
self.dialect.do_execute(
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 590, in do_execute
cursor.execute(statement, parameters)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/cursors.py", line 250, in execute
self.errorhandler(self, exc, value)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/connections.py", line 50, in defaulterrorhandler
raise errorvalue
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/cursors.py", line 247, in execute
res = self._query(query)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/cursors.py", line 411, in _query
rowcount = self._do_query(q)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/cursors.py", line 374, in _do_query
db.query(q)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/connections.py", line 277, in query
_mysql.connection.query(self, query)
_mysql_exceptions.IntegrityError: (1062, "Duplicate entry '361' for key 'timeslot_id'")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/david/Code/aura/engine/src/scheduling/scheduler.py", line 108, in run
self.programme.refresh()
File "/home/david/Code/aura/engine/src/scheduling/programme.py", line 79, in refresh
self.timeslots = self.programme_store.store_timeslots(response)
File "/home/david/Code/aura/engine/src/scheduling/programme.py", line 291, in store_timeslots
timeslot_db = self.store_timeslot(timeslot)
File "/home/david/Code/aura/engine/src/scheduling/programme.py", line 390, in store_timeslot
timeslot_db.store(add=havetoadd, commit=True)
File "/home/david/Code/aura/engine/src/scheduling/models.py", line 77, in store
DB.session.commit()
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 1042, in commit
self.transaction.commit()
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 504, in commit
self._prepare_impl()
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 483, in _prepare_impl
self.session.flush()
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2523, in flush
self._flush(objects)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2664, in _flush
transaction.rollback(_capture_exception=True)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
compat.raise_(
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 178, in raise_
raise exception
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 2624, in _flush
flush_context.execute()
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/unitofwork.py", line 422, in execute
rec.execute(self)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/unitofwork.py", line 586, in execute
persistence.save_obj(
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/persistence.py", line 239, in save_obj
_emit_insert_statements(
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/orm/persistence.py", line 1135, in _emit_insert_statements
result = cached_connections[connection].execute(
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1020, in execute
return meth(self, multiparams, params)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1133, in _execute_clauseelement
ret = self._execute_context(
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1323, in _execute_context
self._handle_dbapi_exception(
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1517, in _handle_dbapi_exception
util.raise_(
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 178, in raise_
raise exception
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1283, in _execute_context
self.dialect.do_execute(
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 590, in do_execute
cursor.execute(statement, parameters)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/cursors.py", line 250, in execute
self.errorhandler(self, exc, value)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/connections.py", line 50, in defaulterrorhandler
raise errorvalue
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/cursors.py", line 247, in execute
res = self._query(query)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/cursors.py", line 411, in _query
rowcount = self._do_query(q)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/cursors.py", line 374, in _do_query
db.query(q)
File "/home/david/Code/aura/engine/python/lib/python3.8/site-packages/MySQLdb/connections.py", line 277, in query
_mysql.connection.query(self, query)
sqlalchemy.exc.IntegrityError: (_mysql_exceptions.IntegrityError) (1062, "Duplicate entry '361' for key 'timeslot_id'")
[SQL: INSERT INTO timeslot (playlist_id, default_schedule_playlist_id, default_show_playlist_id, schedule_fallback_id, show_fallback_id, station_fallback_id, timeslot_start, timeslot_end, timeslot_id, show_id, show_name, show_hosts, funding_category, comment, languages, type, category, topic, musicfocus, is_repetition) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)]
[parameters: (None, None, 9, None, None, None, '2021-01-18T17:38:00', '2021-01-18T17:40:00', 361, 1, 'Musikprogramm', 'Musikredaktion', 'Standard', None, 'Farsi', 'Unmoderiertes Musikprogramm', '', '', '', 0)]
(Background on this error at: http://sqlalche.me/e/gkpj)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/logging/__init__.py", line 1081, in emit
msg = self.format(record)
File "/usr/lib/python3.8/logging/__init__.py", line 925, in format
return fmt.format(record)
File "/usr/lib/python3.8/logging/__init__.py", line 664, in format
record.message = record.getMessage()
File "/usr/lib/python3.8/logging/__init__.py", line 369, in getMessage
msg = msg % self.args
TypeError: not enough arguments for format string
Call stack:
File "/home/david/.vscode/extensions/ms-python.python-2020.12.424452561/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey.py", line 916, in __call__
ret = self.original_func(*self.args, **self.kwargs)
File "/usr/lib/python3.8/threading.py", line 890, in _bootstrap
self._bootstrap_inner()
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/home/david/Code/aura/engine/src/scheduling/scheduler.py", line 115, in run
self.logger.critical(SU.red(f"Unhandled error while fetching & scheduling new programme! ({str(e)})"), e)
Message: '\x1b[31mUnhandled error while fetching & scheduling new programme! ((_mysql_exceptions.IntegrityError) (1062, "Duplicate entry \'361\' for key \'timeslot_id\'")\n[SQL: INSERT INTO timeslot (playlist_id, default_schedule_playlist_id, default_show_playlist_id, schedule_fallback_id, show_fallback_id, station_fallback_id, timeslot_start, timeslot_end, timeslot_id, show_id, show_name, show_hosts, funding_category, comment, languages, type, category, topic, musicfocus, is_repetition) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)]\n[parameters: (None, None, 9, None, None, None, \'2021-01-18T17:38:00\', \'2021-01-18T17:40:00\', 361, 1, \'Musikprogramm\', \'Musikredaktion\', \'Standard\', None, \'Farsi\', \'Unmoderiertes Musikprogramm\', \'\', \'\', \'\', 0)]\n(Background on this error at: http://sqlalche.me/e/gkpj))\x1b[0m'
Arguments: (IntegrityError('(_mysql_exceptions.IntegrityError) (1062, "Duplicate entry \'361\' for key \'timeslot_id\'")'),)
```1.0-alpha2 β βοΈπ¦ Precise PheasantDavid TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/69Engine Installation Documentation: Liquidsoap Repo2021-02-19T18:41:28+01:00Hermann SchwΓ€rzlerEngine Installation Documentation: Liquidsoap RepoWhat exactly is meant by
```
Engine requires at least `Liquidsoap 1.4.3` or newer, installed using [OPAM (OCaml Package Manager)](https://opam.ocaml.org/).
Add the current Liquidsoap repository from [this installation guide](https://w...What exactly is meant by
```
Engine requires at least `Liquidsoap 1.4.3` or newer, installed using [OPAM (OCaml Package Manager)](https://opam.ocaml.org/).
Add the current Liquidsoap repository from [this installation guide](https://www.liquidsoap.info/doc-1.4.3/install.html).
```
In the Liquidsoap installation guide there is no *repository* mentioned. Do you perchance mean:
```
opam init
opam switch create 4.08.0
opam depext taglib mad lame vorbis cry samplerate liquidsoap
```1.0-alpha2 β βοΈπ¦ Precise PheasantDavid TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/67Fade-out fallback playout when returning to scheduled playout2023-02-09T15:38:55+01:00David TrattnigFade-out fallback playout when returning to scheduled playout1.0-alpha1 β π’π¦ Dockland DucklingDavid TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/66Use audio playlist folder for station fallback playlist2020-12-17T12:52:35+01:00David TrattnigUse audio playlist folder for station fallback playlistInstead of the hardcoded "config/playlist" folder use the configurable `audio_playlist_folder` for station fallbacks.Instead of the hardcoded "config/playlist" folder use the configurable `audio_playlist_folder` for station fallbacks.1.0-alpha2 β βοΈπ¦ Precise PheasantDavid TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/63Remove obsolete test cases, add minimal test case2020-12-16T10:31:46+01:00David TrattnigRemove obsolete test cases, add minimal test case1.0-alpha2 β βοΈπ¦ Precise PheasantDavid TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/61Python 3.8 as minimum requirement2020-12-08T20:59:13+01:00David TrattnigPython 3.8 as minimum requirement1.0-alpha2 β βοΈπ¦ Precise PheasantDavid TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/59Remove any Comba Recorder leftovers2020-12-08T19:32:04+01:00David TrattnigRemove any Comba Recorder leftovers1.0-alpha2 β βοΈπ¦ Precise PheasantDavid TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/58Separated action to re-create the database2020-11-27T17:24:09+01:00David TrattnigSeparated action to re-create the database1.0-alpha2 β βοΈπ¦ Precise PheasantDavid TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/57Remove any "test data" references2020-11-27T17:24:08+01:00David TrattnigRemove any "test data" references1.0-alpha2 β βοΈπ¦ Precise PheasantDavid TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/39Refactor to avoid use of Redis2020-10-30T14:42:59+01:00David TrattnigRefactor to avoid use of Redis- [x] Implement alternative communication to Redis
- [x] Remove Redis
- [x] Simplify boot phase- [x] Implement alternative communication to Redis
- [x] Remove Redis
- [x] Simplify boot phase1.0-alpha2 β βοΈπ¦ Precise PheasantDavid TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/38Email to Programme Coordinator(s) when Fallbacks are playing2020-11-04T21:24:41+01:00David TrattnigEmail to Programme Coordinator(s) when Fallbacks are playing1.0-alpha2 β βοΈπ¦ Precise PheasantDavid TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/35Upgrade to Liquidsoap 2.02023-02-09T11:59:20+01:00David TrattnigUpgrade to Liquidsoap 2.01.0-alpha1 β π’π¦ Dockland DucklingDavid TrattnigDavid Trattnighttps://gitlab.servus.at/aura/engine/-/issues/26Fallback Scenario: Play random music from folder2020-10-30T15:28:06+01:00David TrattnigFallback Scenario: Play random music from folderParent Task: Fallback Managment #3
- No fallback level needed
- Play random music as in #25Parent Task: Fallback Managment #3
- No fallback level needed
- Play random music as in #251.0-alpha2 β βοΈπ¦ Precise PheasantDavid TrattnigDavid Trattnig