[issue45485] datetime.strptime issues message attribute of type 'NoneType' is not callableTraceback

2021-10-16 Thread Eric V. Smith


Change by Eric V. Smith :


--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45485] datetime.strptime issues message attribute of type 'NoneType' is not callableTraceback

2021-10-16 Thread Freek de Kruijf


Freek de Kruijf  added the comment:

Op zaterdag 16 oktober 2021 00:03:41 CEST schreef u:
> Eric V. Smith  added the comment:
> 
> It sounds like you're using python 2.7, which is unsupported.
> 
> You've not even shown us what line produces the error you're seeing. I don't
> see "type(a[0])" anywhere in the code you posted.
> 
> Lacking a way to reproduce this on our own with python 3.x, I'm going to
> have to close this issue.

I am sorry I can't be of more help.

-- 
fr.gr.

Freek de Kruijf

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45485] datetime.strptime issues message attribute of type 'NoneType' is not callableTraceback

2021-10-15 Thread Eric V. Smith


Eric V. Smith  added the comment:

It sounds like you're using python 2.7, which is unsupported.

You've not even shown us what line produces the error you're seeing. I don't 
see "type(a[0])" anywhere in the code you posted.

Lacking a way to reproduce this on our own with python 3.x, I'm going to have 
to close this issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45485] datetime.strptime issues message attribute of type 'NoneType' is not callableTraceback

2021-10-15 Thread Freek de Kruijf


Freek de Kruijf  added the comment:

The content of a[0] is something like '2021-10-15T15:02:11.486'

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45485] datetime.strptime issues message attribute of type 'NoneType' is not callableTraceback

2021-10-15 Thread Freek de Kruijf


Freek de Kruijf  added the comment:

About what version of Python is used, I don't know. Both 2.7.18 and 3.6.12 are 
installed. I use the program on a Raspberry Pi 4B with openSUSE Leap 15.3.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45485] datetime.strptime issues message attribute of type 'NoneType' is not callableTraceback

2021-10-15 Thread Freek de Kruijf

Freek de Kruijf  added the comment:

When I try it in a few lines, there is no problem. So it is an issue in this 
bigger context with class definitions.
In the few lines type(a[0]) reports ; in the bigger context 
type(a[0]) reports . I have no idea how to reduce this issue in a 
few lines. It must have to do with the use of class in the bigger program, I 
assume. I found a workaround, so it up to you to analyze this further. I have 
only a vary basic knowledge about Python.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45485] datetime.strptime issues message attribute of type 'NoneType' is not callableTraceback

2021-10-15 Thread Eric V. Smith


Eric V. Smith  added the comment:

If you want us to check if there's a bug in Python here, please reduce this to 
5 or 10 lines, with no external dependencies. As it is, we cannot run this code.

You also need to show how you run the program, what version of Python you're 
using, and what system you're running this on.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45485] datetime.strptime issues message attribute of type 'NoneType' is not callableTraceback

2021-10-15 Thread Freek de Kruijf


Freek de Kruijf  added the comment:

The python program is called from a surrounding system called domoticz. I will 
include the python program.

--
Added file: https://bugs.python.org/file50360/plugin.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45485] datetime.strptime issues message attribute of type 'NoneType' is not callableTraceback

2021-10-15 Thread Eric V. Smith


Eric V. Smith  added the comment:

Please provide a code snippet we can run that demonstrates the problem.

--
nosy: +eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45485] datetime.strptime issues message attribute of type 'NoneType' is not callableTraceback

2021-10-15 Thread Freek de Kruijf


New submission from Freek de Kruijf :

In a piece of code I have
pT = datetime.strptime(a[0],"%Y-%m-%dT%H:%M:%S.%f")
When I check type(a[0]) I got type(a[0]):  not 
In this case I get: message attribute of type 'NoneType' is not 
callableTraceback
When I use str(a[0]) instead of a[0], the issue is gone.
a[0] behaves elsewhere as a string without the surrounding str().
This piece of code is rather local in a larger program.

--
components: Interpreter Core
messages: 404018
nosy: f.de.kruijf
priority: normal
severity: normal
status: open
title: datetime.strptime issues message attribute of type 'NoneType' is not 
callableTraceback
type: behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com