mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-05-09 08:25:54 +02:00
[GH-ISSUE #211] [Bug]: Upgrade deleted all history and projects #130
Labels
No labels
A1
automated
automated
bug
bug
Closed due to inactivity
contrib
dependencies
dependencies
duplicate
enhancement
feedback
hold
invalid
Notes
P1S
pull-request
security
ThumbsUp
user-report
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/bambuddy-maziggy-1#130
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @leisegang on GitHub (Jan 31, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/211
Originally assigned to: @maziggy on GitHub.
Bug Description
Upgrade deleted all history and projects. Almost everything was deleted. all prints, projects and a lot of other things
Expected Behavior
Update should not have deleted things
Steps to Reproduce
upgrade...
Printer Model
P1S
Bambuddy Version
0.1.6
Printer Firmware Version
newest
Installation Method
Docker
Operating System
Docker
Relevant Logs / Support Package
Screenshots
No response
Additional Context
No response
Checklist
@atl285 commented on GitHub (Jan 31, 2026):
Hi. It's not deleted. If you downgrade to 0.1.6b11 all data are shown again.
It seems that the 0.1.6 final release has some problems. I saw many errors in the Docker logfiles.
@leisegang commented on GitHub (Jan 31, 2026):
Thanks, that worked
@endlessben commented on GitHub (Feb 1, 2026):
In the logs, I see an sql error that is preventing the app from displaying this data. It's also preventing file uploads. I'll paste the stacktrace below and attach my debug logs as well.
ERROR: Exception in ASGI application Traceback (most recent call last): File "/usr/local/lib/python3.13/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context self.dialect.do_execute( ~~~~~~~~~~~~~~~~~~~~~~~^ cursor, str_statement, effective_parameters, context ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/local/lib/python3.13/site-packages/sqlalchemy/engine/default.py", line 952, in do_execute cursor.execute(statement, parameters) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/sqlalchemy/dialects/sqlite/aiosqlite.py", line 182, in execute self._adapt_connection._handle_exception(error) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^ File "/usr/local/lib/python3.13/site-packages/sqlalchemy/dialects/sqlite/aiosqlite.py", line 342, in _handle_exception raise error File "/usr/local/lib/python3.13/site-packages/sqlalchemy/dialects/sqlite/aiosqlite.py", line 164, in execute self.await_(_cursor.execute(operation, parameters)) ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 132, in await_only return current.parent.switch(awaitable) # type: ignore[no-any-return,attr-defined] # noqa: E501 ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 196, in greenlet_spawn value = await result ^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/aiosqlite/cursor.py", line 40, in execute await self._execute(self._cursor.execute, sql, parameters) File "/usr/local/lib/python3.13/site-packages/aiosqlite/cursor.py", line 32, in _execute return await self._conn._execute(fn, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/aiosqlite/core.py", line 160, in _execute return await future ^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/aiosqlite/core.py", line 63, in _connection_worker_thread result = function() sqlite3.OperationalError: no such column: print_archives.sliced_for_model The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/local/lib/python3.13/site-packages/uvicorn/protocols/http/httptools_impl.py", line 416, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ self.scope, self.receive, self.send ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/local/lib/python3.13/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__ return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/fastapi/applications.py", line 1135, in __call__ await super().__call__(scope, receive, send) File "/usr/local/lib/python3.13/site-packages/starlette/applications.py", line 107, in __call__ await self.middleware_stack(scope, receive, send) File "/usr/local/lib/python3.13/site-packages/starlette/middleware/errors.py", line 186, in __call__ raise exc File "/usr/local/lib/python3.13/site-packages/starlette/middleware/errors.py", line 164, in __call__ await self.app(scope, receive, _send) File "/usr/local/lib/python3.13/site-packages/starlette/middleware/exceptions.py", line 63, in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "/usr/local/lib/python3.13/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app raise exc File "/usr/local/lib/python3.13/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "/usr/local/lib/python3.13/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__ await self.app(scope, receive, send) File "/usr/local/lib/python3.13/site-packages/starlette/routing.py", line 716, in __call__ await self.middleware_stack(scope, receive, send) File "/usr/local/lib/python3.13/site-packages/starlette/routing.py", line 736, in app await route.handle(scope, receive, send) File "/usr/local/lib/python3.13/site-packages/starlette/routing.py", line 290, in handle await self.app(scope, receive, send) File "/usr/local/lib/python3.13/site-packages/fastapi/routing.py", line 115, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "/usr/local/lib/python3.13/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app raise exc File "/usr/local/lib/python3.13/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "/usr/local/lib/python3.13/site-packages/fastapi/routing.py", line 101, in app response = await f(request) ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/fastapi/routing.py", line 355, in app raw_response = await run_endpoint_function( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<3 lines>... ) ^ File "/usr/local/lib/python3.13/site-packages/fastapi/routing.py", line 243, in run_endpoint_function return await dependant.call(**values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/app/api/routes/archives.py", line 277, in analyze_failures return await service.analyze_failures( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<3 lines>... ) ^ File "/app/backend/app/services/failure_analysis.py", line 124, in analyze_failures recent_result = await self.db.execute( ^^^^^^^^^^^^^^^^^^^^^^ ...<4 lines>... ) ^ File "/usr/local/lib/python3.13/site-packages/sqlalchemy/ext/asyncio/session.py", line 449, in execute result = await greenlet_spawn( ^^^^^^^^^^^^^^^^^^^^^ ...<6 lines>... ) ^ File "/usr/local/lib/python3.13/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 201, in greenlet_spawn result = context.throw(*sys.exc_info()) File "/usr/local/lib/python3.13/site-packages/sqlalchemy/orm/session.py", line 2351, in execute return self._execute_internal( ~~~~~~~~~~~~~~~~~~~~~~^ statement, ^^^^^^^^^^ ...<4 lines>... _add_event=_add_event, ^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/local/lib/python3.13/site-packages/sqlalchemy/orm/session.py", line 2249, in _execute_internal result: Result[Any] = compile_state_cls.orm_execute_statement( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ self, ^^^^^ ...<4 lines>... conn, ^^^^^ ) ^ File "/usr/local/lib/python3.13/site-packages/sqlalchemy/orm/context.py", line 306, in orm_execute_statement result = conn.execute( statement, params or {}, execution_options=execution_options ) File "/usr/local/lib/python3.13/site-packages/sqlalchemy/engine/base.py", line 1419, in execute return meth( self, distilled_parameters, execution_options or NO_OPTIONS, ) File "/usr/local/lib/python3.13/site-packages/sqlalchemy/sql/elements.py", line 527, in _execute_on_connection return connection._execute_clauseelement( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ self, distilled_params, execution_options ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/local/lib/python3.13/site-packages/sqlalchemy/engine/base.py", line 1641, in _execute_clauseelement ret = self._execute_context( dialect, ...<8 lines>... cache_hit=cache_hit, ) File "/usr/local/lib/python3.13/site-packages/sqlalchemy/engine/base.py", line 1846, in _execute_context return self._exec_single_context( ~~~~~~~~~~~~~~~~~~~~~~~~~^ dialect, context, statement, parameters ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/local/lib/python3.13/site-packages/sqlalchemy/engine/base.py", line 1986, in _exec_single_context self._handle_dbapi_exception( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ e, str_statement, effective_parameters, cursor, context ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/local/lib/python3.13/site-packages/sqlalchemy/engine/base.py", line 2363, in _handle_dbapi_exception raise sqlalchemy_exception.with_traceback(exc_info[2]) from e File "/usr/local/lib/python3.13/site-packages/sqlalchemy/engine/base.py", line 1967, in _exec_single_context self.dialect.do_execute( ~~~~~~~~~~~~~~~~~~~~~~~^ cursor, str_statement, effective_parameters, context ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/local/lib/python3.13/site-packages/sqlalchemy/engine/default.py", line 952, in do_execute cursor.execute(statement, parameters) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/sqlalchemy/dialects/sqlite/aiosqlite.py", line 182, in execute self._adapt_connection._handle_exception(error) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^ File "/usr/local/lib/python3.13/site-packages/sqlalchemy/dialects/sqlite/aiosqlite.py", line 342, in _handle_exception raise error File "/usr/local/lib/python3.13/site-packages/sqlalchemy/dialects/sqlite/aiosqlite.py", line 164, in execute self.await_(_cursor.execute(operation, parameters)) ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 132, in await_only return current.parent.switch(awaitable) # type: ignore[no-any-return,attr-defined] # noqa: E501 ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 196, in greenlet_spawn value = await result ^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/aiosqlite/cursor.py", line 40, in execute await self._execute(self._cursor.execute, sql, parameters) File "/usr/local/lib/python3.13/site-packages/aiosqlite/cursor.py", line 32, in _execute return await self._conn._execute(fn, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/aiosqlite/core.py", line 160, in _execute return await future ^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/aiosqlite/core.py", line 63, in _connection_worker_thread result = function() sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: print_archives.sliced_for_model [SQL: SELECT print_archives.id, print_archives.printer_id, print_archives.project_id, print_archives.filename, print_archives.file_path, print_archives.file_size, print_archives.content_hash, print_archives.thumbnail_path, print_archives.timelapse_path, print_archives.source_3mf_path, print_archives.f3d_path, print_archives.print_name, print_archives.print_time_seconds, print_archives.filament_used_grams, print_archives.filament_type, print_archives.filament_color, print_archives.layer_height, print_archives.total_layers, print_archives.nozzle_diameter, print_archives.bed_temperature, print_archives.nozzle_temperature, print_archives.sliced_for_model, print_archives.status, print_archives.started_at, print_archives.completed_at, print_archives.extra_data, print_archives.makerworld_url, print_archives.designer, print_archives.external_url, print_archives.is_favorite, print_archives.tags, print_archives.notes, print_archives.cost, print_archives.photos, print_archives.failure_reason, print_archives.quantity, print_archives.energy_kwh, print_archives.energy_cost, print_archives.created_at FROM print_archives WHERE print_archives.created_at >= ? AND print_archives.status IN (?, ?) ORDER BY print_archives.created_at DESC LIMIT ? OFFSET ?] [parameters: ('2026-01-02 03:27:47.380200', 'failed', 'aborted', 10, 0)] (Background on this error at: https://sqlalche.me/e/20/e3q8)bambuddy-support-20260131-222620.zip
@maziggy commented on GitHub (Feb 1, 2026):
Yesterday I had to push the Docker image twice, becaue the first version indeed had a database problem. Don't know how fast after release you guys pulled the image, but I would strongly suggest to pull it again!
Just upgraded Docker installation from 0.1.6b11 to 0.1.6 and had no issues at all.
How do you guys upgraded and from what version?
@Spanholz commented on GitHub (Feb 1, 2026):
Can confirm. Archive is gone with an upgrade from 0.16b11 to 0.16final. Bambuddy is running in a debian 13 LXC on proxmox
@karaktaka commented on GitHub (Feb 1, 2026):
I just restored an old backup and updated from v0.1.6b11 to v0.1.6 and all archives and statistics are gone. I can still see them in the database and there are also still present on disk. (I deleted the image and re-downloaded it to make sure I have the new one)
I can also confirm that switching back to v0.1.6b11 brings back archive and statistics.
bambuddy-support-20260201-115023.zip
@atl285 commented on GitHub (Feb 1, 2026):
I cleaned up my docker environment some minutes ago, using
docker system prune --all. After re-pulling the the image and starting up, the archive and print history are not available. After pulling thebambuddy:0.1.6b11and recreating the container, everything is back.@maziggy commented on GitHub (Feb 1, 2026):
Think I've found the problem. Let me test.....
@maziggy commented on GitHub (Feb 1, 2026):
New docker images are pushed! Please check and let me know. Thanks!
@sirana225 commented on GitHub (Feb 1, 2026):
Same problem with the latest image - no statistics
@maziggy commented on GitHub (Feb 1, 2026):
OK....can please someone let me know what exactly is missing after upgrading?
@sirana225 commented on GitHub (Feb 1, 2026):
Archives
Statistics
Project
is what i'm missing
@leisegang commented on GitHub (Feb 1, 2026):
I am missing everything that is queried frø the SQL.
The data isnt delete. But it cant fetch it.
I tried installing it again today. And same error.
Maybe you should increase the buildnuber by 1 so that the unraid gets the update?
@maziggy commented on GitHub (Feb 1, 2026):
Looks like it was not properly merged into main branch.
Pushed new Docker images. Please try again.
@leisegang commented on GitHub (Feb 1, 2026):
Pulling image: ghcr.io/maziggy/bambuddy:0.1.6-hotfix
TOTAL DATA PULLED: 0 B
@maziggy commented on GitHub (Feb 1, 2026):
:latest
@karaktaka commented on GitHub (Feb 1, 2026):
I can confirm that for me archive and statistics are now back.
But I also agree that you should increase the version number to indicate a change or at least add a hotfix patch version.
@maziggy commented on GitHub (Feb 1, 2026):
Yes, need to change my workflow.
@maziggy commented on GitHub (Feb 1, 2026):
Can someone else confirm that it is working now?
@leisegang commented on GitHub (Feb 1, 2026):
When i use latest my server finds the latest 1.6 and does not download a new copy.so maybe realease a 1.6.1 version?
@maziggy commented on GitHub (Feb 1, 2026):
Delete the image locally
@heviiguy commented on GitHub (Feb 1, 2026):
It seems that things are on track so that everything functions as intended again 👍. Nevertheless, I'd ike to submit the error message seen when I had tried to upload (re-upload!) a single 3mf file. This had been uploaded and stored successfully prior to the upgrade. It may be moot but, if issues persist, perhaps this may help to shed some light...
(sqlite3.OperationalError) table print_archives has no column named sliced_for_model [SQL: INSERT INTO print_archives (printer_id, project_id, filename, file_path, file_size, content_hash, thumbnail_path, timelapse_path, source_3mf_path, f3d_path, print_name, print_time_seconds, filament_used_grams, filament_type, filament_color, layer_height, total_layers, nozzle_diameter, bed_temperature, nozzle_temperature, sliced_for_model, status, started_at, completed_at, extra_data, makerworld_url, designer, external_url, is_favorite, tags, notes, cost, failure_reason, quantity, energy_kwh, energy_cost) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id, created_at] [parameters: (None, None, 'Pig Seal-Body.3mf', 'archive/unassigned/20260201_142112_Pig Seal-Body/Pig Seal-Body.3mf', 112518, '34b5b6272914d274fd7a2b7907837114b40dc103f5fd8ab235206f902a62931b', 'archive/unassigned/20260201_142112_Pig Seal-Body/thumbnail.png', None, None, None, 'Pig Seal-Body', None, None, 'TPU, PLA', '#FFFF0A,#A7A6A8,#000000', 0.24, None, 0.4, None, 230, 'P1S', 'archived', None, '2026-02-01 14:21:12.920074', '{"filament_type": "TPU, PLA", "filament_color": "#FFFF0A,#A7A6A8,#000000", "layer_height": 0.24, "nozzle_diameter": 0.4, "nozzle_temperature": 230, "sliced_for_model": "P1S", "designer": "", "print_name": ""}', None, '', None, 0, None, None, None, None, 1, None, None)] (Background on this error at: https://sqlalche.me/e/20/e3q8)@maziggy commented on GitHub (Feb 1, 2026):
You are NOT running the latest image!
docker pull ghcr.io/maziggy/bambuddy:latest
@endlessben commented on GitHub (Feb 1, 2026):
Confirming this is fixed for me in latest. Thank you for the fix!
On Sun, Feb 1 2026 at 8:48 AM, MartinNYHC @.***> wrote:
@atl285 commented on GitHub (Feb 1, 2026):
I can confirm too, that the latest docker container works again ans shows archives and print history. 🙂
@leisegang commented on GitHub (Feb 1, 2026):
After running docker system prune --all and then installing again i got it working.
I think this can be closed