Comments (5)
Can you attach a full traceback?
from django-request.
Can you attach a full traceback?
Thanks for the reply. After trying to work around this several different ways I switched to the "legacy" VS2019 Python debugger and the problem appears to disappear. I don't know what the difference is between the debuggers but the newer one appears to do something that causes the initialisation/construction of Python to go wrong.
The first issue is in settings:
Message='SERVER_NAME'
Source=C:\Tools\Web\myweb\mywebApp\apps\request\settings.py
StackTrace:
File "C:\Tools\Web\myweb\mywebApp\apps\request\settings.py", line 40, in <module> (Current frame)
BASE_URL = getattr(settings, 'REQUEST_BASE_URL', 'http://{0}'.format(get_current_site(HttpRequest()).domain))
File "C:\Tools\Web\myweb\mywebApp\apps\request\models.py", line 9, in <module>
from . import settings as request_settings
File "C:\Tools\Web\myweb\mywebApp\manage.py", line 24, in <module>
execute_from_command_line(sys.argv)
If I skip that I get:
Message='super' object has no attribute '__getattr__'
Source=C:\Tools\Web\myweb\mywebApp\apps\request\managers.py
StackTrace:
File "C:\Tools\Web\myweb\mywebApp\apps\request\managers.py", line 106, in __getattr__ (Current frame)
super().__getattr__(*args, **kwargs)
File "C:\Tools\Web\myweb\mywebApp\apps\request\models.py", line 16, in <module>
class Request(models.Model):
File "C:\Tools\Web\myweb\mywebApp\manage.py", line 24, in <module>
execute_from_command_line(sys.argv)
from django-request.
It would be nice to use the newer debugger as it appears to be a lot faster.
Docs:
Visual Studio 2017 versions 15.8 and later use a debugger based on ptvsd version 4.1+. Visual Studio 2019 versions 16.5 and later use a debugger based on debugpy. These versions of the debugger are compatible with Python 2.7 and Python 3.5+.
from django-request.
I guess this is a bug with debugpy. Not 100% sure though.
from django-request.
I upgraded debugpy to 1.6.0 from 1.2.0 and still get issues. I can runserver from the command-line without issues, but in VS2019 I get, as before:
Message='super' object has no attribute '__getattr__'
Source=C:\Tools\Web\MyWeb\MyWebApp\apps\request\managers.py
StackTrace:
File "C:\Tools\Web\MyWeb\MyWebApp\apps\request\managers.py", line 106, in __getattr__ (Current frame)
super().__getattr__(*args, **kwargs)
File "C:\Tools\Web\MyWeb\MyWebApp\apps\request\models.py", line 16, in <module>
class Request(models.Model):
File "C:\Tools\Web\MyWeb\MyWebApp\manage.py", line 24, in <module>
execute_from_command_line(sys.argv)
Not getting the SERVER_NAME issue now though.
from django-request.
Related Issues (20)
- Demonstration or more elaborate explanation of django-request features?
- Recognise Microsoft Edge browser is not Chrome HOT 2
- Clarify that the sites framework is not required, and does not support HTTPS HOT 3
- Django 4 support HOT 4
- Middleware causes 500 Internal Server Error on attempted Log4J exploit HOT 1
- Migration missing from released package
- 1.6.1 released on pypi, not tagged on github HOT 1
- test_day and test_day_without_date failures HOT 4
- use unittest.mock instead of mock HOT 2
- Support Real Aggregation in Overview Chart HOT 2
- How can we track request completion time? HOT 1
- Proxy NGINX is not sending REMOTE_ADDR - not working on production. HOT 3
- Is there and way using which I can track only given paths? HOT 1
- Adding response code 429 to the list
- Your models in app(s): 'request' have changes that are not yet reflected in a migration, and so won't be applied. HOT 1
- Doesn't work in production enironment HOT 3
- purgerequests does not seem to work
- on a production server the wrong IP address is saved to the database HOT 1
- Can we get a release 1.6.3 with the recent fixes? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-request.