Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1054, "Unknown column 'prof_file' in 'field list'" #706

Open
Narmadhai opened this issue Feb 29, 2024 · 0 comments
Open

1054, "Unknown column 'prof_file' in 'field list'" #706

Narmadhai opened this issue Feb 29, 2024 · 0 comments

Comments

@Narmadhai
Copy link

Environment:

Request Method: GET
Request URL: http://127.0.0.1:8000/

Django Version: 5.0
Python Version: 3.10.12
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'files',
'silk']

Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'silk.middleware.SilkyMiddleware']

Traceback (most recent call last):
File "/home/ls72/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 105, in _execute
return self.cursor.execute(sql, params)
File "/home/ls72/venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py", line 75, in execute
return self.cursor.execute(query, args)
File "/home/ls72/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 179, in execute
res = self._query(mogrified_query)
File "/home/ls72/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 330, in _query
db.query(q)
File "/home/ls72/venv/lib/python3.10/site-packages/MySQLdb/connections.py", line 257, in query
_mysql.connection.query(self, query)

The above exception ((1054, "Unknown column 'prof_file' in 'field list'")) was the direct cause of the following exception:
File "/home/ls72/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
File "/home/ls72/venv/lib/python3.10/site-packages/silk/middleware.py", line 70, in call
self.process_request(request)
File "/home/ls72/venv/lib/python3.10/site-packages/silk/profiling/profiler.py", line 57, in wrapped_target
result = target(*args, **kwargs)
File "/home/ls72/venv/lib/python3.10/site-packages/silk/middleware.py", line 120, in process_request
request_model = RequestModelFactory(request).construct_request_model()
File "/home/ls72/venv/lib/python3.10/site-packages/silk/model_factory.py", line 230, in construct_request_model
request_model = models.Request.objects.create(
File "/home/ls72/venv/lib/python3.10/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/ls72/venv/lib/python3.10/site-packages/django/db/models/query.py", line 677, in create
obj.save(force_insert=True, using=self.db)
File "/home/ls72/venv/lib/python3.10/site-packages/silk/models.py", line 203, in save
super().save(*args, **kwargs)
File "/home/ls72/venv/lib/python3.10/site-packages/django/db/models/base.py", line 814, in save
self.save_base(
File "/home/ls72/venv/lib/python3.10/site-packages/django/db/models/base.py", line 901, in save_base
updated = self._save_table(
File "/home/ls72/venv/lib/python3.10/site-packages/django/db/models/base.py", line 1059, in _save_table
results = self._do_insert(
File "/home/ls72/venv/lib/python3.10/site-packages/django/db/models/base.py", line 1100, in _do_insert
return manager._insert(
File "/home/ls72/venv/lib/python3.10/site-packages/django/db/models/manager.py", line 87, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/ls72/venv/lib/python3.10/site-packages/django/db/models/query.py", line 1845, in _insert
return query.get_compiler(using=using).execute_sql(returning_fields)
File "/home/ls72/venv/lib/python3.10/site-packages/django/db/models/sql/compiler.py", line 1822, in execute_sql
cursor.execute(sql, params)
File "/home/ls72/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 122, in execute
return super().execute(sql, params)
File "/home/ls72/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 79, in execute
return self._execute_with_wrappers(
File "/home/ls72/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 92, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/home/ls72/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 100, in _execute
with self.db.wrap_database_errors:
File "/home/ls72/venv/lib/python3.10/site-packages/django/db/utils.py", line 91, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/home/ls72/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 105, in _execute
return self.cursor.execute(sql, params)
File "/home/ls72/venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py", line 75, in execute
return self.cursor.execute(query, args)
File "/home/ls72/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 179, in execute
res = self._query(mogrified_query)
File "/home/ls72/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 330, in _query
db.query(q)
File "/home/ls72/venv/lib/python3.10/site-packages/MySQLdb/connections.py", line 257, in query
_mysql.connection.query(self, query)

Exception Type: OperationalError at /
Exception Value: (1054, "Unknown column 'prof_file' in 'field list'")

Issue:When I'm Using Mysql as Db .why???

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant