I get exactly those errors all the time. I believe it is related to
Windows being Windows. It appears to have nothing to do with any code I
have written. Everything still works.
It looks like an unknown glitch occurs and the current request gets
finished (handle_request in socket_server.py) gracefully and then the
thread gets terminated. A new one seems to get created automatically by
the dev server for the next request.
Stopping it is way above my pay grade.
I have long since stopped worrying about it.
It's lucky that Tim Berners-Lee made the web stateless hey?
Cheers
Mike
On 17/01/2020 2:58 pm, maninder singh Kumar wrote:
> Perhaps a problem with the smtp server, I am wondering if the email
> object got initialized at all.
> --
>
> Maninder Kumar
>
http://about.me/maninder.s.kumar
>
> <
http://about.me/maninder.s.kumar?promo=email_sig>
> **
>
> *
1.views.py <
http://1.views.py> *
>
> class ProfileCreateAPIView(CreateAPIView):
> queryset = User.objects.all()
> model = UsuarioPerfil
> serializer_class = UserSerializer
>
> *
2.serializers.py <
http://2.serializers.py>*
>
> *
> *
>
> class UserSerializer(serializers.ModelSerializer):
> usuario_perfil = UsuarioPerfilSerializer()
> generar_correo_confirmacion =
> serializers.CharField(required=False) enviar_correo =
> serializers.CharField(required=False) class Meta: model = User
> fields = ['password', 'email', 'username', 'first_name',
> 'last_name', 'usuario_perfil', 'generar_correo_confirmacion',
> 'enviar_correo'] def create(self, validated_data):
> #######################CREATION OF USER AND
> USERPROFILE#####################################
>
> profile_data = validated_data.pop('usuario_perfil') user =
> User.objects.create( username=validated_data['username'],
> email=validated_data['email'],
> first_name=validated_data["first_name"],
> last_name=validated_data["last_name"], is_active=False )
> user.set_password(validated_data['password']) user.save()
> UsuarioPerfil.objects.create( usuario=user, perfil=perfil,
> red_social=red_social, **profile_data) ###########CONFIRMATION
> EMAIL###############################################################
> token = account_validation_token.make_token(user) user_id =
> urlsafe_base64_encode(force_bytes(
user.id <
http://user.id>))
> kwargs={'user_id': user_*id*, 'token': token}) try: htmly =
> get_template('mail/recuperacion_contrasenia.html') d =
> {'confirm_url': url} subject, from_email, to = 'Confirmacion
> de cuenta', settings.EMAIL_HOST_USER, user.email html_content
> = htmly.render(d) msg = EmailMultiAlternatives(subject,
> html_content, from_email, [to])
> msg.attach_alternative(html_content, "text / html") msg.send()
> except: print(":c") return user
>
>
> What it's confusing me its that there's no trace of this error
> if i send an email in a View which gets fired after a GET
> request. Also i've tried putting the logic in a post method
> in django view , without using Django Rest Framework, but the
> error still appears
>
> I'd be so grateful if you help me. Thanks in advance
> José Chacón
>
>
> --
> You received this message because you are subscribed to the
> Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from
> it, send an email to
django-users...@googlegroups.com
> <mailto:
django-users...@googlegroups.com>.
> <
https://groups.google.com/d/msgid/django-users/d1cdb3b2-0f25-4ce5-b66e-3bbdb66e0cac%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to
django-users...@googlegroups.com
> <mailto:
django-users...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/django-users/CAMDZ7Cw612WQOjEPynhBZiXj5DJ-XsfCC-7GL_8qGL_CSxAHWQ%40mail.gmail.com
> <
https://groups.google.com/d/msgid/django-users/CAMDZ7Cw612WQOjEPynhBZiXj5DJ-XsfCC-7GL_8qGL_CSxAHWQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
django-users...@googlegroups.com
> <mailto:
django-users...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/django-users/CABOHK3SuuOyhgqiP4de1H%3DMSWZ7dHLAkRSG7Yvhs1q47JAp%2BoA%40mail.gmail.com
> <
https://groups.google.com/d/msgid/django-users/CABOHK3SuuOyhgqiP4de1H%3DMSWZ7dHLAkRSG7Yvhs1q47JAp%2BoA%40mail.gmail.com?utm_medium=email&utm_source=footer>.