-
Notifications
You must be signed in to change notification settings - Fork 286
Parser doesn't support absolute path on windows #234
Comments
Could it be wrotten like
|
Can you be more specific about the parameter on how to reproduce and why this code fixed the bug? |
because the url_scheme is e, it goes into the else branch and raise ThriftParserError |
I see, I'll look into this problem later. For now, you may want to check |
I am also encountering this issue. My temporary fix was to edit thriftpy/parser/parser.py, and change line 488 from This will fix it for files located in the C: drive as this resolves to a uri protocol of c, we probably need to also add 'd', 'e', 'f' etc to be safe - or do something a bit more sensible. |
The problem only occurs when I use pip to install thriftpy. Tested on: |
I confirm the suggested patch "#234 (comment)" is mandatory to have a working Thriftpy on WinPython. I suspect the bug was not in 0.3.8, only in 0.3.9 |
Theoretically, you try to open the path as a file as the fallback to unsupported schemes, rather than simply giving up. Let the filesystem figure out what it can and can't open rather than trying to preempt it. |
Alternatively, maybe it's a bad idea for "load" to magically coerce different path types to begin with, and the function should have separate treatments for "filesystem paths" and "URLs". |
What is the plan to fix this issue? Why wasn't the PR accepted? As it stands Windows users cannot use packages that use thirftpy, e.g. happybase, because they import thriftpy and it falls over.. |
Any update on the status of this issue? |
Guys, I'm also hitting this issue when trying to use py_zipkin on windows. |
@wooparadog stays pretty busy, from what it sounds like. I agree that #285 is a good enough approach, we should accept it. |
Hi all, I accept markmnl@0801f46 in thriftpy2 to fix it, thanks! |
Using urlparse to get the path's schema ,but on windows ,it doesn't work well.
When loads file using absolute path , it would raise
The text was updated successfully, but these errors were encountered: