Trouble with version 3.8
Terry Reedy
tjreedy at udel.edu
Tue Jun 2 00:04:19 EDT 2020
On 6/1/2020 4:54 PM, Jim Parinisi via Python-list wrote:
>
> I had been using python 3.6 on two computers with windows 7 and windows 10. We bought a windows 10 machine and I installed python 3.8 on it. Many of my python apps failed with an error similar to this > File "C:\Python38\lib\os.py", line 818, in fsdecode filename =
fspath(filename) # Does type-checking of `filename`.TypeError: expected
str, bytes or os.PathLike object, not list
When posting tracebacks, *copy* and paste the full traceback *with hard
returns* so lines are not joined together as above. With them inserted,
the above is:
File "C:\Python38\lib\os.py", line 818, in fsdecode
filename = fspath(filename) # Does type-checking of `filename`.
TypeError: expected str, bytes or os.PathLike object, not list
fsdecode is being passed a list as a filename. Look at the full
traceback to see if that comes from you or something internal.
> Any advice on how to fix version 3.8 would be appreciated.
Don't assume that 3.8 is the problem and in need of a fix. Maybe your
code depends on a bug in 3.6 fixed in the 3.8 you installed. fsdecode
itself is the same in 3.6 and 3.8. On Windows, fspath is supplied by
the C-coded nt module. You could search the change logs in What's New
3.7 and 3.8 for mention of fspath.
--
Terry Jan Reedy
More information about the Python-list
mailing list