question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: Server Error (500)

See original GitHub issue

Describe the bug

(After update) navigating to the webUI shows “Server Error (500)”

Steps to reproduce

  • Use docker version (nikisweeting/archivebox:latest)
  • Update to v0.6.2
  • Navigate to webUI

Screenshots or log output

image

Some selected portions of the log that might be relevant:

12 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): core.
'python manage.py migrate' to apply them.
, 2021 - 19:58:06
ersion 3.1.8, using settings 'core.settings'
development server at http://0.0.0.0:8000/
server with CONTROL-C.
min/login/ HTTP/1.1" 200 11144
min/login/ HTTP/1.1" 200 11144
TTP/1.1" 302 0
blic HTTP/1.1" 301 0
Server Error: /public/
k (most recent call last):
sr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
elf.cursor.execute(sql, params)
sr/local/lib/python3.9/site-packages/django/db/backends/sqlite3/base.py", line 413, in execute
atabase.Cursor.execute(self, query, params)
OperationalError: no such column: core_archiveresult.uuid

e exception was the direct cause of the following exception:

k (most recent call last):
sr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
= get_response(request)
sr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 204, in _get_response
= response.render()
sr/local/lib/python3.9/site-packages/django/template/response.py", line 105, in render
tent = self.rendered_content
sr/local/lib/python3.9/site-packages/django/template/response.py", line 83, in rendered_content
emplate.render(context, self._request)
sr/local/lib/python3.9/site-packages/django/template/backends/django.py", line 61, in render
elf.template.render(context)
sr/local/lib/python3.9/site-packages/django/template/base.py", line 170, in render
elf._render(context)
sr/local/lib/python3.9/site-packages/django/template/base.py", line 162, in _render
elf.nodelist.render(context)
sr/local/lib/python3.9/site-packages/django/template/base.py", line 938, in render
de.render_annotated(context)
sr/local/lib/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
elf.render(context)
sr/local/lib/python3.9/site-packages/django/template/loader_tags.py", line 150, in render
ompiled_parent._render(context)
sr/local/lib/python3.9/site-packages/django/template/base.py", line 162, in _render
elf.nodelist.render(context)
sr/local/lib/python3.9/site-packages/django/template/base.py", line 938, in render
de.render_annotated(context)
sr/local/lib/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
elf.render(context)
sr/local/lib/python3.9/site-packages/django/template/loader_tags.py", line 62, in render
block.nodelist.render(context)
sr/local/lib/python3.9/site-packages/django/template/base.py", line 938, in render
de.render_annotated(context)
sr/local/lib/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
elf.render(context)
sr/local/lib/python3.9/site-packages/django/template/defaulttags.py", line 211, in render
.append(node.render_annotated(context))
sr/local/lib/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
elf.render(context)
sr/local/lib/python3.9/site-packages/django/template/loader_tags.py", line 192, in render
emplate.render(context)
sr/local/lib/python3.9/site-packages/django/template/base.py", line 172, in render
elf._render(context)
sr/local/lib/python3.9/site-packages/django/template/base.py", line 162, in _render
elf.nodelist.render(context)
sr/local/lib/python3.9/site-packages/django/template/base.py", line 938, in render
de.render_annotated(context)
sr/local/lib/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
elf.render(context)
sr/local/lib/python3.9/site-packages/django/template/defaulttags.py", line 305, in render
condition.eval(context)
sr/local/lib/python3.9/site-packages/django/template/defaulttags.py", line 889, in eval
elf.value.resolve(context, ignore_failures=True)
sr/local/lib/python3.9/site-packages/django/template/base.py", line 671, in resolve
lf.var.resolve(context)
sr/local/lib/python3.9/site-packages/django/template/base.py", line 796, in resolve
self._resolve_lookup(context)
sr/local/lib/python3.9/site-packages/django/template/base.py", line 858, in _resolve_lookup
= current()
pp/archivebox/core/models.py", line 139, in icons
napshot_icons(self)
pp/archivebox/index/html.py", line 190, in snapshot_icons
ache.get_or_set(cache_key, calc_snapshot_icons)
sr/local/lib/python3.9/site-packages/django/core/cache/backends/base.py", line 171, in get_or_set
= default()
pp/archivebox/index/html.py", line 149, in calc_snapshot_icons
lt in archive_results:
sr/local/lib/python3.9/site-packages/django/db/models/query.py", line 287, in __iter__
tch_all()
sr/local/lib/python3.9/site-packages/django/db/models/query.py", line 1308, in _fetch_all
sult_cache = list(self._iterable_class(self))
sr/local/lib/python3.9/site-packages/django/db/models/query.py", line 53, in __iter__
= compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
sr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1156, in execute_sql
xecute(sql, params)
sr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 66, in execute
elf._execute_with_wrappers(sql, params, many=False, executor=self._execute)
sr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
xecutor(sql, params, many, context)
sr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
elf.cursor.execute(sql, params)
sr/local/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__
_exc_value.with_traceback(traceback) from exc_value
sr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
elf.cursor.execute(sql, params)
sr/local/lib/python3.9/site-packages/django/db/backends/sqlite3/base.py", line 413, in execute
atabase.Cursor.execute(self, query, params)
b.utils.OperationalError: no such column: core_archiveresult.uuid

ArchiveBox version

ArchiveBox v0.6.2
Cpython Linux Linux-5.10.28-Unraid-x86_64-with-glibc2.28 x86_64
IN_DOCKER=True DEBUG=False IS_TTY=True TZ=UTC SEARCH_BACKEND_ENGINE=ripgrep

[i] Dependency versions:
 √  ARCHIVEBOX_BINARY     v0.6.2          valid     /usr/local/bin/archivebox                                                   
 √  PYTHON_BINARY         v3.9.4          valid     /usr/local/bin/python3.9                                                    
 √  DJANGO_BINARY         v3.1.8          valid     /usr/local/lib/python3.9/site-packages/django/bin/django-admin.py           
 √  CURL_BINARY           v7.64.0         valid     /usr/bin/curl                                                               
 √  WGET_BINARY           v1.20.1         valid     /usr/bin/wget                                                               
 √  NODE_BINARY           v15.14.0        valid     /usr/bin/node                                                               
 √  SINGLEFILE_BINARY     v0.3.16         valid     /node/node_modules/single-file/cli/single-file                              
 √  READABILITY_BINARY    v0.0.2          valid     /node/node_modules/readability-extractor/readability-extractor              
 √  MERCURY_BINARY        v1.0.0          valid     /node/node_modules/@postlight/mercury-parser/cli.js                         
 √  GIT_BINARY            v2.20.1         valid     /usr/bin/git                                                                
 √  YOUTUBEDL_BINARY      v2021.04.07     valid     /usr/local/bin/youtube-dl                                                   
 √  CHROME_BINARY         v89.0.4389.114  valid     /usr/bin/chromium                                                           
 √  RIPGREP_BINARY        v0.10.0         valid     /usr/bin/rg                                                                 

[i] Source-code locations:
 √  PACKAGE_DIR           23 files        valid     /app/archivebox                                                             
 √  TEMPLATES_DIR         3 files         valid     /app/archivebox/templates                                                   
 -  CUSTOM_TEMPLATES_DIR  -               disabled                                                                              

[i] Secrets locations:
 -  CHROME_USER_DATA_DIR  -               disabled                                                                              
 -  COOKIES_FILE          -               disabled                                                                              

[i] Data locations:
 √  OUTPUT_DIR            7 files         valid     /data                                                                       
 √  SOURCES_DIR           61 files        valid     ./sources                                                                   
 √  LOGS_DIR              1 files         valid     ./logs                                                                      
 √  ARCHIVE_DIR           98 files        valid     ./archive                                                                   
 √  CONFIG_FILE           81.0 Bytes      valid     ./ArchiveBox.conf                                                           
 √  SQL_INDEX             936.0 KB        valid     ./index.sqlite3   

Here is the errors.log.

(I did try to run the python manage.py migrate, but just got this: python: can't open file '/data/manage.py': [Errno 2] No such file or directory.)

Please let me know if there is more information I can provide. Thank you for your help!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
Ruthalascommented, Apr 22, 2021

I was able to achieve that via the following steps:

  1. Navigate to data folder: cd /data
  2. Change to archivebox user: su - archivebox
  3. Run init: archivebox init

Thank you for your prompt and detailed assistance!

1reaction
rsnitschcommented, Aug 24, 2021

I had the same problem. The main cause was "no such column: core_archiveresult.uuid" along with the warning "You have X unapplied migrations." In other words: The database scheme was changed and my pre-existing database from an earlier archivebox version needed an update.

I don’t understand why archivebox init was recommended in this thread. It’s supposed to initiate a new archivebox setup, not update a preexisting one. If it can do updates, too, then maybe the description for the init command should be updated.

Instead of running archivebox init, I used

docker-compose run archivebox manage migrate

This executes the database migrations only.

Addendum: I just saw in the 0.6.2 changelog that the init command was enhanced recently: “add init --quick and server --quick-init options to quickly update the db version without doing a full re-init (for users with large archive collections this will make version upgrades a lot faster / less painful)”

I guess init --quick does the same as manage migrate.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTP 500 Internal Server Error: What It Means & How to Fix It
An HTTP 500 internal server error is a general error message. It covers unexpected issues that don't fit into existing error codes. HTTP...
Read more >
What Is a "500 Internal Server Error" and How Do I Fix It?
This error means there is a problem on the server side. A server error can be caused by any number of things from...
Read more >
How to Fix a 500 Internal Server Error on Your WordPress Site
The 500 Internal Server Error status code occurs when the server encounters an error that prevents it from fulfilling the request.
Read more >
HTTP Error 500 – Internal Server Error Explained in Plain ...
Simply put, the server tried to do something and failed. According to RFC 7231: The 500 (Internal Server Error) status code indicates that...
Read more >
What is a 500 Internal Server Error? - Linux Hint
Among the most commonly encountered errors while web-browsing, '500 Internal Server Bug' is topped only by the infamous error 404. The 500 internal...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found