I am using django version 3.0.4, Python 3.8.2 (Python 3.8.2
(tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD64)]
on win32).
I am new to django and doing the tutorial on the django website. In the
second tutorial where we use the interactive shell, we added choices using
code:
{{{
# Create three choices.
>>> q.choice_set.create(choice_text='Not much', votes=0)
<Choice: Not much>
>>> q.choice_set.create(choice_text='The sky', votes=0)
<Choice: The sky>
>>> c = q.choice_set.create(choice_text='Just hacking again', votes=0)
}}}
This could executes fine, but for the sake of testing I tried:
{{{
>>> c = q.choice_set.create(choice_text='hacking some choices',
votes=3151)
}}}
which results in the following unhandled exception:
{{{
Unhandled exception in event loop:
File "C:\some-path\Python\Python38\lib\asyncio\proactor_events.py", line
768, in _loop_self_reading
f.result() # may raise
File "C:\some-path\Python38\lib\asyncio\windows_events.py", line 808, in
_poll
value = callback(transferred, key, ov)
File "C:\some-path\Python38\lib\asyncio\windows_events.py", line 457, in
finish_recv
raise ConnectionResetError(*exc.args)
Exception [WinError 995] The I/O operation has been aborted because of
either a thread exit or an application request
}}}
The choice that caused the exception still gets created even though the
exception occurred. Then proceeding with the tutorial and ignoring the
Exception, we try to use the method count by:
{{{
>>> q.choice_set.count()
3
}}}
When I try to do it on my side, I again get an exception:
{{{
n [16]: q.choice_set.count()
Out[16]: 6
Unhandled exception in event loop:
File "C:\some-path\Python\Python38\lib\asyncio\proactor_events.py", line
768, in _loop_self_reading
f.result() # may raise
File "C:\some-path\Python\Python38\lib\asyncio\windows_events.py", line
808, in _poll
value = callback(transferred, key, ov)
File "C:\some-path\Python\Python38\lib\asyncio\windows_events.py", line
457, in finish_recv
raise ConnectionResetError(*exc.args)
}}}
Again, I'm new to django but I cant see why the code I executed would
cause any Unhandled Exceptions like these.
Please let me know if you need any additional information.
--
Ticket URL: <https://code.djangoproject.com/ticket/31348>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => invalid
* component: Uncategorized => Core (Other)
Comment:
Thanks for this ticket, however this is not related with tutorials or even
with Django. IMO this is an issue in Python 3.8, see
https://bugs.python.org/issue39010.
Closing per TicketClosingReasons/UseSupportChannels.
--
Ticket URL: <https://code.djangoproject.com/ticket/31348#comment:1>
Comment (by Robin):
I see, thanks for the quick response. I switched to Python 3.7.4 for now.
--
Ticket URL: <https://code.djangoproject.com/ticket/31348#comment:2>