Skip to content

Bug: running archivebox init on empty folder results in error #1785

@askoa

Description

@askoa

Provide a screenshot and describe the bug

Running archivebox init on an empty folder results in error `TypeError: not all arguments converted during string formatting'. The error is generated while executing below line.

cursor.execute("SELECT id FROM machine_machine WHERE guid = ?", [guid])

Steps to reproduce

Install archivebox using instructions given in monorepo.
Run `archivebox init` in empty folder.

Logs or errors

File "/venv/lib/python3.13/site-packages/django/db/migrations/operations/special.py", line 199, in database_forwards
    self.code(from_state.apps, schema_editor)
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/archivebox/archivebox/core/migrations/0027_copy_archiveresult_to_process.py", line 292, in copy_archiveresult_data_to_process
    machine_id = get_or_create_current_machine(cursor)
  File "/app/archivebox/archivebox/core/migrations/0027_copy_archiveresult_to_process.py", line 51, in get_or_create_current_machine
    cursor.execute("SELECT id FROM machine_machine WHERE guid = ?", [guid])
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.13/site-packages/django/db/backends/utils.py", line 121, in execute
    with self.debug_sql(sql, params, use_last_executed_query=True):
         ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/uv/python/cpython-3.13.12-linux-x86_64-gnu/lib/python3.13/contextlib.py", line 148, in __exit__
    next(self.gen)
    ~~~~^^^^^^^^^^
  File "/venv/lib/python3.13/site-packages/django/db/backends/utils.py", line 139, in debug_sql
    sql = self.db.ops.last_executed_query(self.cursor, sql, params)
  File "/venv/lib/python3.13/site-packages/django/db/backends/sqlite3/operations.py", line 181, in last_executed_query
    return sql % params
           ~~~~^~~~~~~~
TypeError: not all arguments converted during string formatting

ArchiveBox Version

dev branch.

How did you install the version of ArchiveBox you are using?

Docker (or Podman/LXC/K8s/TrueNAS/Proxmox/etc)

What operating system are you running on?

Linux (Ubuntu/Debian/Arch/Alpine/etc.)

What type of drive are you using to store your ArchiveBox data?

  • some of data/ is on a local SSD or NVMe drive
  • some of data/ is on a spinning hard drive or external USB drive
  • some of data/ is on a network mount (e.g. NFS/SMB/Ceph/GlusterFS/etc.)
  • some of data/ is on a FUSE mount (e.g. SSHFS/RClone/S3/B2/Google Drive/Dropbox/etc.)

Docker Compose Configuration

ArchiveBox Configuration

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions