Open NateEaton opened 4 months ago
First of all, thanks for your feedback, which is really welcome and for testing this pice of code.
I made some adjustments in the meantime to the code base, which was not pushed to this repository yet. But now it is. It also includes some major changes and I sugest to do a complete reinstall (checkout and run general setup tasks as documented).
You log shows more different errors:
My tested setup includes only some Raspberry Pi 1 and some Banana PI M2 Zero for the frontend component (showing the pictures) while the server component was tested on Raspberry Pi 3 and 5. The current running setup is running the frontend components and server component separately (3 frontend, 1 server).
Which setup do you want to run the components in your case?
Btw. I also tried to fix your mentioned typos and updated the package versions (also making mysql commented out, because it's an optional package only required when using MySQL database).
Interesting project that looks like it would meet my needs but after installing and configuring I get an error on the first run that I am not clear how to resolve. I'm including the output below.
BTW, a few points to share, the first two of which may relate directly to the issue:
Output: `(venv) pi@Framarama:~/framarama $ python manage.py runserver --noreload Scheduler started Added job "Config source updates" to job store "default" Added job "Config source updates triggered" to job store "default" Running job "Config source updates triggered (trigger: date[2024-07-27 14:34:21 UTC], next run at: 2024-07-27 14:34:21 UTC)" (scheduled at 2024-07-27 14:34:21.237985+00:00) Removed job cfg_source_update_1722090861.235239 Job "Config source updates triggered (trigger: date[2024-07-27 14:34:21 UTC], next run at: 2024-07-27 14:34:21 UTC)" raised an exception Traceback (most recent call last): File "/home/pi/framarama/venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 89, in _execute return self.cursor.execute(sql, params) File "/home/pi/framarama/venv/lib/python3.9/site-packages/django/db/backends/sqlite3/base.py", line 477, in execute return Database.Cursor.execute(self, query, params) sqlite3.OperationalError: no such table: config_source
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/home/pi/framarama/venv/lib/python3.9/site-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, job.kwargs) File "/home/pi/framarama/framarama/jobs.py", line 38, in
self._scheduler.add_job(lambda *args, *kwargs: func(args, kwargs), id=job_id, args=_func_args, kwargs=_func_kwargs, *args, **kwargs)
File "/home/pi/framarama/config/jobs.py", line 55, in source_update
for _source in models.Source.objects.filter(_criteria).order_by('-update_date_start'):
File "/home/pi/framarama/venv/lib/python3.9/site-packages/django/db/models/query.py", line 320, in iter
self._fetch_all()
File "/home/pi/framarama/venv/lib/python3.9/site-packages/django/db/models/query.py", line 1507, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/home/pi/framarama/venv/lib/python3.9/site-packages/django/db/models/query.py", line 57, in iter
results = compiler.execute_sql(
File "/home/pi/framarama/venv/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1361, in execute_sql
cursor.execute(sql, params)
File "/home/pi/framarama/venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(
File "/home/pi/framarama/venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/home/pi/framarama/venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
File "/home/pi/framarama/venv/lib/python3.9/site-packages/django/db/utils.py", line 91, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/home/pi/framarama/venv/lib/python3.9/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
File "/home/pi/framarama/venv/lib/python3.9/site-packages/django/db/backends/sqlite3/base.py", line 477, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such table: config_source
Scheduler started
Run "which xinput": code=0, stdout=16 bytes, stderr=0 bytes
Run "which xmodmap": code=0, stdout=17 bytes, stderr=0 bytes
Error running "pidof xinput": code=1, stdout=b'', stderr=b''
Error running "xmodmap -pke": code=1, stdout=b'', stderr=b"xmodmap: unable to open display ''\n"
Traceback (most recent call last):
File "/home/pi/framarama/manage.py", line 22, in
main()
File "/home/pi/framarama/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/home/pi/framarama/venv/lib/python3.9/site-packages/django/core/management/init.py", line 446, in execute_from_command_line
utility.execute()
File "/home/pi/framarama/venv/lib/python3.9/site-packages/django/core/management/init.py", line 420, in execute
django.setup()
File "/home/pi/framarama/venv/lib/python3.9/site-packages/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/pi/framarama/venv/lib/python3.9/site-packages/django/apps/registry.py", line 124, in populate
app_config.ready()
File "/home/pi/framarama/framarama/apps.py", line 36, in ready
self.setup_frontend()
File "/home/pi/framarama/frontend/apps.py", line 11, in setup_frontend
self._scheduler.start()
File "/home/pi/framarama/framarama/jobs.py", line 118, in start
self.configure()
File "/home/pi/framarama/frontend/jobs.py", line 49, in configure
self._monitor.start()
File "/home/pi/framarama/framarama/base/frontend.py", line 593, in start
self._verify_running()
File "/home/pi/framarama/framarama/base/frontend.py", line 580, in _verify_running
self._keymap = [_line.split() for _line in Process.exec_run(['xmodmap', '-pke']).split(b'\n')]
AttributeError: 'NoneType' object has no attribute 'split'`