Closed puremourning closed 4 years ago
Thanks for the report! Isn't p = cast_path( p )
good enough?
It's just kind of hard to get the Python2/Python3 conversions all correct. IMO the sys path should probably already be unicode and not bytes.
It probably is.. I just quickly went for the cast all the things approach and didn’t reduce it cos I was at work and needed a solution :)
I just "fixed" it. Since this is Python 2 I don't do proper testing anymore, I pretty much just do whatever it takes to get it work. Python 2 will soon not be supported anymore.
Thanks!
First, apologies for the absolute vagueness of this report (i don't have a minimal reproduction script, but i do have a patch, which fixes it for me (tm)).
I have a YCM environment where ycmd (thus Jedi) is being run under python 3, but the jedi enviroment is told to use a python 2.7.5 interpreter. I have found in a particular file that I frequently get failed requests with the following error:
TypeError: Can't mix strings and bytes in path components
This is happening with the following backtrace:
Versions in question:
But I've also tried
master
of Jedi and Parso.Following the traceback, I tried the following patch, which fixed it for my particular case, but i'll be honest when i say it is certainly not canonical and I don't quite understand why it's necessary:
Again, apologies for not including a repro, but hopefully this is enough info to repro ?