[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]) instea

[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 <https://bugs.python.

[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

[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 <https://bugs.python.org/is

[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 <https://bugs.python.o

[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 s

[issue41759] ElementTree.parse gives error message about missing1 required positional argument: 'source' but it is there

2020-09-11 Thread Freek de Kruijf
New submission from Freek de Kruijf : In a function definition I have the following piece of code: try: with open(requests,'rt') as f: tree = ElementTree.parse(f) On execution I got: Traceback (most recent call last): File "/srv/www/bin/web.py

[issue41759] ElementTree.parse gives error message about missing1 required positional argument: 'source' but it is there

2020-09-11 Thread Freek de Kruijf
Freek de Kruijf added the comment: Op vrijdag 11 september 2020 11:31:29 CEST schreef u: > Serhiy Storchaka added the comment: > > parse() is an instance method. It should be called as tree.parse(f) (where > tree is an instance of ElementTree), not ElementTree.parse(f). >

[issue41759] ElementTree.parse gives error message about missing1 required positional argument: 'source' but it is there

2020-09-11 Thread Freek de Kruijf
Freek de Kruijf added the comment: Op vrijdag 11 september 2020 17:06:43 CEST schreef u: > Serhiy Storchaka added the comment: > > It was not clear what you do without code and full traceback. > > The example uses *function* parse() from *module* ElementTree. Your code >