This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vinayakuh
Recipients vinayakuh
Date 2021-09-30.06:26:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1632983217.04.0.955112259844.issue45327@roundup.psfhosted.org>
In-reply-to
Content
Below snippet works fine on Python2

>>> import json
>>> tc_report_file = False
>>> tc_data = json.load(open(tc_report_file))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: coercing to Unicode: need string or buffer, bool found
>>>

as we can see it is throwing an exception

same piece of code is stuck at Python3.8.10

vinayakh@ats-engine:~/stf_files$ python3
Python 3.8.10 (default, Jun  2 2021, 10:49:15)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import json
>>> tc_report_file = False
>>> tc_data = json.load(open(tc_report_file))
History
Date User Action Args
2021-09-30 06:26:57vinayakuhsetrecipients: + vinayakuh
2021-09-30 06:26:57vinayakuhsetmessageid: <1632983217.04.0.955112259844.issue45327@roundup.psfhosted.org>
2021-09-30 06:26:57vinayakuhlinkissue45327 messages
2021-09-30 06:26:56vinayakuhcreate