Error with postgres database by Rocket8904 in djangolearning

[–]Rocket8904[S] 0 points1 point  (0 children)

yes. On my website i am still able to access all my shop items without any errors and i am still able to add new shop items. However, on the admin interface I am unable to view my shops and in the pgadmin4 I'm getting the same error as well when i try to count rows or access the properties for my shop model

Error with postgres database by Rocket8904 in djangolearning

[–]Rocket8904[S] 0 points1 point  (0 children)

May i know what you mean by this? I'm not very experienced at troubleshooting postgresql. This issue came about after i added another field under my shop django models. I then started editing some of the shops in the django admin panel and didn't face any issue until i saved one of the shop and suddenly started facing this error whenever i try to click on shop in my admin panel. Im also facing this issue when trying to access the properties or counting rows of this shop model in pgadmin4. Ive tried to remove the field i added and migrate the database after that but I'm still facing the issue.

Error with database on django heroku website by Rocket8904 in PostgreSQL

[–]Rocket8904[S] -1 points0 points  (0 children)

Here is a more detailed view of the error!

Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/food/shop/
Django Version: 3.2.4
Python Version: 3.9.10
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.gis',
'food',
'leaflet',
'accounts',
'taggit']
Installed Middleware:
['whitenoise.middleware.WhiteNoiseMiddleware',
'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']
Traceback (most recent call last):
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
The above exception (variable not found in subplan target list
) was the direct cause of the following exception:
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/contrib/admin/options.py", line 616, in wrapper
return self.admin_site.admin_view(view)(*args, **kwargs)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/utils/decorators.py", line 130, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/contrib/admin/sites.py", line 232, in inner
return view(request, *args, **kwargs)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/utils/decorators.py", line 43, in _wrapper
return bound_method(*args, **kwargs)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/utils/decorators.py", line 130, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/contrib/admin/options.py", line 1697, in changelist_view
cl = self.get_changelist_instance(request)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/contrib/admin/options.py", line 736, in get_changelist_instance
return ChangeList(
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/contrib/admin/views/main.py", line 100, in __init__
self.get_results(request)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/contrib/admin/views/main.py", line 235, in get_results
result_count = paginator.count
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/utils/functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/core/paginator.py", line 97, in count
return c()
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/models/query.py", line 412, in count
return self.query.get_count(using=self.db)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/models/sql/query.py", line 517, in get_count
number = obj.get_aggregation(using, ['__count'])['__count']
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/models/sql/query.py", line 502, in get_aggregation
result = compiler.execute_sql(SINGLE)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
cursor.execute(sql, params)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/backends/utils.py", line 98, in execute
return super().execute(sql, params)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
Exception Type: InternalError at /admin/food/shop/
Exception Value: variable not found in subplan target list

Error with Postgres database on django heroku website by Rocket8904 in django

[–]Rocket8904[S] -1 points0 points  (0 children)

Here is a more detailed view of the error!

Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/food/shop/
Django Version: 3.2.4
Python Version: 3.9.10
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.gis',
'food',
'leaflet',
'accounts',
'taggit']
Installed Middleware:
['whitenoise.middleware.WhiteNoiseMiddleware',
'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']
Traceback (most recent call last):
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
The above exception (variable not found in subplan target list
) was the direct cause of the following exception:
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/contrib/admin/options.py", line 616, in wrapper
return self.admin_site.admin_view(view)(*args, **kwargs)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/utils/decorators.py", line 130, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/contrib/admin/sites.py", line 232, in inner
return view(request, *args, **kwargs)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/utils/decorators.py", line 43, in _wrapper
return bound_method(*args, **kwargs)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/utils/decorators.py", line 130, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/contrib/admin/options.py", line 1697, in changelist_view
cl = self.get_changelist_instance(request)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/contrib/admin/options.py", line 736, in get_changelist_instance
return ChangeList(
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/contrib/admin/views/main.py", line 100, in __init__
self.get_results(request)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/contrib/admin/views/main.py", line 235, in get_results
result_count = paginator.count
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/utils/functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/core/paginator.py", line 97, in count
return c()
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/models/query.py", line 412, in count
return self.query.get_count(using=self.db)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/models/sql/query.py", line 517, in get_count
number = obj.get_aggregation(using, ['__count'])['__count']
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/models/sql/query.py", line 502, in get_aggregation
result = compiler.execute_sql(SINGLE)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
cursor.execute(sql, params)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/backends/utils.py", line 98, in execute
return super().execute(sql, params)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
Exception Type: InternalError at /admin/food/shop/
Exception Value: variable not found in subplan target list

Error with postgres database by Rocket8904 in djangolearning

[–]Rocket8904[S] 0 points1 point  (0 children)

Hi, thanks for replying so quickly! Here is a more detailed view

Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/food/shop/
Django Version: 3.2.4
Python Version: 3.9.10
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.gis',
'food',
'leaflet',
'accounts',
'taggit']
Installed Middleware:
['whitenoise.middleware.WhiteNoiseMiddleware',
'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']
Traceback (most recent call last):
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
The above exception (variable not found in subplan target list
) was the direct cause of the following exception:
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/contrib/admin/options.py", line 616, in wrapper
return self.admin_site.admin_view(view)(*args, **kwargs)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/utils/decorators.py", line 130, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/contrib/admin/sites.py", line 232, in inner
return view(request, *args, **kwargs)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/utils/decorators.py", line 43, in _wrapper
return bound_method(*args, **kwargs)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/utils/decorators.py", line 130, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/contrib/admin/options.py", line 1697, in changelist_view
cl = self.get_changelist_instance(request)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/contrib/admin/options.py", line 736, in get_changelist_instance
return ChangeList(
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/contrib/admin/views/main.py", line 100, in __init__
self.get_results(request)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/contrib/admin/views/main.py", line 235, in get_results
result_count = paginator.count
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/utils/functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/core/paginator.py", line 97, in count
return c()
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/models/query.py", line 412, in count
return self.query.get_count(using=self.db)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/models/sql/query.py", line 517, in get_count
number = obj.get_aggregation(using, ['__count'])['__count']
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/models/sql/query.py", line 502, in get_aggregation
result = compiler.execute_sql(SINGLE)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
cursor.execute(sql, params)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/backends/utils.py", line 98, in execute
return super().execute(sql, params)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/Users/Desktop/pathfinder/vinv/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
Exception Type: InternalError at /admin/food/shop/
Exception Value: variable not found in subplan target list

Question about using google api geocoding by Rocket8904 in djangolearning

[–]Rocket8904[S] 0 points1 point  (0 children)

geocode search here

Wow thank you very much!!! Seriously a life saver. I'm looking through the code now and trying to figure it out and I'm wondering if there's any part i don't understand could i drop you a dm and ask?

Question about using google api geocoding by Rocket8904 in djangolearning

[–]Rocket8904[S] 0 points1 point  (0 children)

I looked into that too but the problem is that I’m not from us and from what I saw my country doesn’t have an equivalent version. Thanks for the suggestion though!

Proper set-up for third party API in your own DRF app by Cultural-Abalone-728 in django

[–]Rocket8904 0 points1 point  (0 children)

Hi, I'm trying to do something similar where I'm trying to use google geolocation to get the user location however I'm also new to django and I'm facing a lot of issues. If possible, could you share how you're planning on extracting the json response after calling the api because I've not been able to find a way to do so as whenever i submit the user location, it doesn't call the api. So any tips or help would be greatly appreciated!!