dependabot[bot] on npm_and_yarn
Bump file-type from 16.5.2 to 1… (compare)
twiddli on dev
implement download queue ui; add collections; notifications; grouping; improv… and 26 more (compare)
twiddli on dev
implement page navigation; add … add reader end content; minor f… add states; and 28 more (compare)
import __hpx__ as hpx
GalleryProgress = hpx.command.GetDatabaseModel("GalleryProgress")
def update_gallery_progress(gallery, page = "last"):
"""
Update a GalleryProgress
Args:
gallery: gallery object
page: "first", "last" or int
"""
gallery_id = gallery.id
page_id = gallery.last_page.id
if page == 'first':
page_id = gallery.first_page.id
elif isinstance(page, int):
page_id = gallery.pages[page].id
GalleryProgress.update_progress(gallery_id, page_id)
sorry, I haven't tested it, but this should work
Jan-01 01:47:43--INFO [plugin].context.file-metadata.main: Attempting with DataType.eze
Jan-01 01:47:43--INFO [plugin].context.file-metadata.main: DataType.eze matched!
Jan-01 01:47:43--WARNING [plugin].context.file-metadata: An unhandled exception 'AttributeError' was raised by plugin handler on command 'GalleryFS.parse_metadata_file'
Jan-01 01:47:43--WARNING [plugin].context.file-metadata: An unhandled exception 'AttributeError' was raised by plugin handler on command 'GalleryFS.parse_metadata_file' by file-metadata:e38e24e4...c75510097653
if data.get('times_read'):
gdata.times_read = SetValue(data['times_read'])
log.debug("applied times_read")
if data['times_read'] > 0:
gallery_id = gallery.id
page_id = gallery.last_page.id
GalleryProgress.update_progress(gallery_id, page_id)
error.log
@twiddli The message I sent here contains the whole plugin.log file, do you want some other log as well?
Mar-03 22:00:58--DEBUG [command].happypanda.core.command: Calling main function of command: AddItem
Mar-03 22:00:58--INFO [command].happypanda.core.commands.database_cmd: Adding 9900 items
Mar-03 22:00:58--DEBUG [core].happypanda.core.async_utils: Running <bound method AddItem._add_to_db of <happypanda.core.commands.database_cmd.AddItem object at 0x08892468>> in native thread
Mar-03 22:00:58--DEBUG [server].happypanda.core.server: Client disconnected ('127.0.0.1', 51570)
Mar-03 22:00:58--DEBUG [server].happypanda.core.server: Client disconnected ('127.0.0.1', 51576)
Mar-03 22:00:59--DEBUG [server].happypanda.core.server: Client disconnected ('127.0.0.1', 51572)
Mar-03 22:00:59--DEBUG [server].happypanda.core.server: Client disconnected ('127.0.0.1', 51573)
Mar-03 22:00:59--DEBUG [server].happypanda.core.server: Client disconnected ('127.0.0.1', 51575)
Mar-03 22:10:04--ERROR [command].happypanda.core.commands.database_cmd: An error occurred when adding item
Traceback (most recent call last):
File "site-packages\sqlalchemy\orm\session.py", line 2557, in _flush
File "site-packages\sqlalchemy\orm\unitofwork.py", line 403, in execute
File "site-packages\sqlalchemy\orm\unitofwork.py", line 361, in _generate_actions
File "site-packages\sqlalchemy\orm\unitofwork.py", line 490, in execute
MemoryError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "happypanda\core\commands\database_cmd.py", line 1188, in _add_to_db
File "happypanda\core\commands\database_cmd.py", line 1139, in _add_item
File "site-packages\sqlalchemy\orm\session.py", line 1027, in commit
File "site-packages\sqlalchemy\orm\session.py", line 494, in commit
File "site-packages\sqlalchemy\orm\session.py", line 473, in _prepare_impl
File "site-packages\sqlalchemy\orm\session.py", line 2459, in flush
File "site-packages\sqlalchemy\orm\session.py", line 2597, in _flush
File "site-packages\sqlalchemy\util\langhelpers.py", line 79, in __exit__
File "site-packages\sqlalchemy\util\compat.py", line 153, in reraise
File "site-packages\sqlalchemy\orm\session.py", line 2597, in _flush
File "site-packages\sqlalchemy\orm\session.py", line 534, in rollback
File "site-packages\sqlalchemy\orm\session.py", line 361, in _restore_snapshot
MemoryError
Mar-03 22:10:12--ERROR [command].happypanda.core.commands.database_cmd: An error occurred when adding item
Traceback (most recent call last):
File "happypanda\core\commands\database_cmd.py", line 1188, in _add_to_db
File "happypanda\core\commands\database_cmd.py", line 1139, in _add_item
File "site-packages\sqlalchemy\orm\session.py", line 1027, in commit
File "site-packages\sqlalchemy\orm\session.py", line 492, in commit
File "site-packages\sqlalchemy\orm\session.py", line 299, in _assert_active
sqlalchemy.exc.InvalidRequestError: This session is in 'inactive' state, due to the SQL transaction being rolled back; no further SQL can be emitted within this transaction.