Hi I’m having trouble with setting up the service.
Mar 30 12:23:33 osmc systemd[1]: Started Flexget Daemon.
Mar 30 12:24:12 osmc flexget[273]: 2018-03-30 12:24 WARNING manager Your locale declares ascii as the filesystem encoding. Any plugins reading fi
Mar 30 12:24:34 osmc flexget[273]: Traceback (most recent call last):
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context
Mar 30 12:24:34 osmc flexget[273]: context)
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute
Mar 30 12:24:34 osmc flexget[273]: cursor.execute(statement, parameters)
Mar 30 12:24:34 osmc flexget[273]: sqlite3.OperationalError: attempt to write a readonly database
Mar 30 12:24:34 osmc flexget[273]: The above exception was the direct cause of the following exception:
Mar 30 12:24:34 osmc flexget[273]: Traceback (most recent call last):
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/bin/flexget", line 11, in <module>
Mar 30 12:24:34 osmc flexget[273]: sys.exit(main())
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/__init__.py", line 42, in main
Mar 30 12:24:34 osmc flexget[273]: manager.start()
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/manager.py", line 330, in start
Mar 30 12:24:34 osmc flexget[273]: self.initialize()
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/manager.py", line 203, in initialize
Mar 30 12:24:34 osmc flexget[273]: self.load_config()
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/manager.py", line 625, in load_config
Mar 30 12:24:34 osmc flexget[273]: self.update_config(config)
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/manager.py", line 636, in update_config
Mar 30 12:24:34 osmc flexget[273]: self.config = self.validate_config(config)
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/manager.py", line 689, in validate_config
Mar 30 12:24:34 osmc flexget[273]: config = fire_event('manager.before_config_validate', config, self)
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/event.py", line 106, in fire_event
Mar 30 12:24:34 osmc flexget[273]: result = event(*args, **kwargs)
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/event.py", line 23, in __call__
Mar 30 12:24:34 osmc flexget[273]: return self.func(*args, **kwargs)
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/plugins/modify/variables.py", line 87, in process_variables
Mar 30 12:24:34 osmc flexget[273]: variables_to_db(variables)
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/plugins/modify/variables.py", line 65, in variables_to_db
Mar 30 12:24:34 osmc flexget[273]: session.merge(variables)
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 1839, in merge
Mar 30 12:24:34 osmc flexget[273]: self._autoflush()
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 1407, in _autoflush
Mar 30 12:24:34 osmc flexget[273]: util.raise_from_cause(e)
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
Mar 30 12:24:34 osmc flexget[273]: reraise(type(exception), exception, tb=exc_tb, cause=cause)
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 187, in reraise
Mar 30 12:24:34 osmc flexget[273]: raise value
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 1397, in _autoflush
Mar 30 12:24:34 osmc flexget[273]: self.flush()
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 2171, in flush
Mar 30 12:24:34 osmc flexget[273]: self._flush(objects)
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 2291, in _flush
Mar 30 12:24:34 osmc flexget[273]: transaction.rollback(_capture_exception=True)
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
Mar 30 12:24:34 osmc flexget[273]: compat.reraise(exc_type, exc_value, exc_tb)
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 187, in reraise
Mar 30 12:24:34 osmc flexget[273]: raise value
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 2255, in _flush
Mar 30 12:24:34 osmc flexget[273]: flush_context.execute()
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/unitofwork.py", line 389, in execute
Mar 30 12:24:34 osmc flexget[273]: rec.execute(self)
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/unitofwork.py", line 548, in execute
Mar 30 12:24:34 osmc flexget[273]: uow
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/persistence.py", line 177, in save_obj
Mar 30 12:24:34 osmc flexget[273]: mapper, table, update)
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/persistence.py", line 737, in _emit_update_statements
Mar 30 12:24:34 osmc flexget[273]: execute(statement, multiparams)
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 945, in execute
Mar 30 12:24:34 osmc flexget[273]: return meth(self, multiparams, params)
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/sql/elements.py", line 263, in _execute_on_connection
Mar 30 12:24:34 osmc flexget[273]: return connection._execute_clauseelement(self, multiparams, params)
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1053, in _execute_clauseelement
Mar 30 12:24:34 osmc flexget[273]: compiled_sql, distilled_params
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context
Mar 30 12:24:34 osmc flexget[273]: context)
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1402, in _handle_dbapi_exception
Mar 30 12:24:34 osmc flexget[273]: exc_info
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
Mar 30 12:24:34 osmc flexget[273]: reraise(type(exception), exception, tb=exc_tb, cause=cause)
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 186, in reraise
Mar 30 12:24:34 osmc flexget[273]: raise value.with_traceback(tb)
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context
Mar 30 12:24:34 osmc flexget[273]: context)
Mar 30 12:24:34 osmc flexget[273]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute
Mar 30 12:24:34 osmc flexget[273]: cursor.execute(statement, parameters)
Mar 30 12:24:34 osmc flexget[273]: sqlalchemy.exc.OperationalError: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this
Mar 30 12:24:36 osmc systemd[1]: flexget.service: Main process exited, code=exited, status=1/FAILURE
Mar 30 12:24:45 osmc flexget[1010]: 2018-03-30 12:24 WARNING manager Your locale declares ascii as the filesystem encoding. Any plugins reading f
Mar 30 12:25:05 osmc flexget[1010]: Traceback (most recent call last):
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context
Mar 30 12:25:05 osmc flexget[1010]: context)
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute
Mar 30 12:25:05 osmc flexget[1010]: cursor.execute(statement, parameters)
Mar 30 12:25:05 osmc flexget[1010]: sqlite3.OperationalError: attempt to write a readonly database
Mar 30 12:25:05 osmc flexget[1010]: The above exception was the direct cause of the following exception:
Mar 30 12:25:05 osmc flexget[1010]: Traceback (most recent call last):
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/bin/flexget", line 11, in <module>
Mar 30 12:25:05 osmc flexget[1010]: sys.exit(main())
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/__init__.py", line 42, in main
Mar 30 12:25:05 osmc flexget[1010]: manager.start()
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/manager.py", line 330, in start
Mar 30 12:25:05 osmc flexget[1010]: self.initialize()
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/manager.py", line 203, in initialize
Mar 30 12:25:05 osmc flexget[1010]: self.load_config()
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/manager.py", line 625, in load_config
Mar 30 12:25:05 osmc flexget[1010]: self.update_config(config)
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/manager.py", line 636, in update_config
Mar 30 12:25:05 osmc flexget[1010]: self.config = self.validate_config(config)
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/manager.py", line 689, in validate_config
Mar 30 12:25:05 osmc flexget[1010]: config = fire_event('manager.before_config_validate', config, self)
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/event.py", line 106, in fire_event
Mar 30 12:25:05 osmc flexget[1010]: result = event(*args, **kwargs)
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/event.py", line 23, in __call__
Mar 30 12:25:05 osmc flexget[1010]: return self.func(*args, **kwargs)
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/plugins/modify/variables.py", line 87, in process_variables
Mar 30 12:25:05 osmc flexget[1010]: variables_to_db(variables)
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/flexget/plugins/modify/variables.py", line 65, in variables_to_db
Mar 30 12:25:05 osmc flexget[1010]: session.merge(variables)
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 1839, in merge
Mar 30 12:25:05 osmc flexget[1010]: self._autoflush()
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 1407, in _autoflush
Mar 30 12:25:05 osmc flexget[1010]: util.raise_from_cause(e)
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
Mar 30 12:25:05 osmc flexget[1010]: reraise(type(exception), exception, tb=exc_tb, cause=cause)
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 187, in reraise
Mar 30 12:25:05 osmc flexget[1010]: raise value
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 1397, in _autoflush
Mar 30 12:25:05 osmc flexget[1010]: self.flush()
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 2171, in flush
Mar 30 12:25:05 osmc flexget[1010]: self._flush(objects)
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 2291, in _flush
Mar 30 12:25:05 osmc flexget[1010]: transaction.rollback(_capture_exception=True)
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
Mar 30 12:25:05 osmc flexget[1010]: compat.reraise(exc_type, exc_value, exc_tb)
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 187, in reraise
Mar 30 12:25:05 osmc flexget[1010]: raise value
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/session.py", line 2255, in _flush
Mar 30 12:25:05 osmc flexget[1010]: flush_context.execute()
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/unitofwork.py", line 389, in execute
Mar 30 12:25:05 osmc flexget[1010]: rec.execute(self)
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/unitofwork.py", line 548, in execute
Mar 30 12:25:05 osmc flexget[1010]: uow
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/persistence.py", line 177, in save_obj
Mar 30 12:25:05 osmc flexget[1010]: mapper, table, update)
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/orm/persistence.py", line 737, in _emit_update_statements
Mar 30 12:25:05 osmc flexget[1010]: execute(statement, multiparams)
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 945, in execute
Mar 30 12:25:05 osmc flexget[1010]: return meth(self, multiparams, params)
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/sql/elements.py", line 263, in _execute_on_connection
Mar 30 12:25:05 osmc flexget[1010]: return connection._execute_clauseelement(self, multiparams, params)
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1053, in _execute_clauseelement
Mar 30 12:25:05 osmc flexget[1010]: compiled_sql, distilled_params
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1189, in _execute_context
Mar 30 12:25:05 osmc flexget[1010]: context)
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1402, in _handle_dbapi_exception
Mar 30 12:25:05 osmc flexget[1010]: exc_info
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
Mar 30 12:25:05 osmc flexget[1010]: reraise(type(exception), exception, tb=exc_tb, cause=cause)
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/util/compat.py", line 186, in reraise
Mar 30 12:25:05 osmc flexget[1010]: raise value.with_traceback(tb)
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context
Mar 30 12:25:05 osmc flexget[1010]: context)
Mar 30 12:25:05 osmc flexget[1010]: File "/home/osmc/flexget/lib/python3.5/site-packages/sqlalchemy/engine/default.py", line 470, in do_execute
Mar 30 12:25:05 osmc flexget[1010]: cursor.execute(statement, parameters)
Mar 30 12:25:05 osmc flexget[1010]: sqlalchemy.exc.OperationalError: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this
Mar 30 12:25:06 osmc systemd[1]: flexget.service: Control process exited, code=exited status=1
Mar 30 12:25:06 osmc systemd[1]: flexget.service: Unit entered failed state.
Mar 30 12:25:06 osmc systemd[1]: flexget.service: Failed with result 'exit-code'.
Any idea what’s the problem here? If I do
sudo ~/flexget/bin/flexget execute --now
it does work. I’ve also installed the flexget==2.11.21 version. I’m not sure about the require field bit, although I use the move-series task.
By adding the user root to the system and changing the user to root in the service file I’ve managed to make it work.