Closed N0tA1dan closed 1 year ago
I think I know where this comes from, will likely need to issue a patch. However, can you also share your app code, so I can understand better the inception of the error from an application perspective?
If possible, it'd also be great if you could drop a breakpoint in here to capture what the value raised is supposed to be, that way we can fix two problems at one (because once we fix the issue in reporting what the ValueError
is, it's going to show us the real underlying exception).
Actually, I've added a test case where I thought this might be coming from, it passes. We're using shlex.split to parse log lines, so the likely issue is the given log line isn't compatible with Unix shell syntax—so without seeing the log line at hand, I'm not sure we can debug further. Hopefully you can provide more info so we can make this actionable.
Without an example, the only way I can get this error to be raised is with an example like this:
from pyngrok.process import NgrokLog
NgrokLog("lvl=WARN msg=Tom's")
But this is invalid anyway. If special characters are going to be used within valid Unix-style syntax, they should be in quotes—you'd see the same issue putting spaces in a test, for example:
NgrokLog("lvl=WARN msg=Hello world")
will only produce 'hello' as the msg
. Valid syntax in both cases would be:
NgrokLog("lvl=WARN msg=\"Test=This is Tom's test\"")
NgrokLog("lvl=WARN msg=\"Hello world\"")
The CI/CD pipeline also runs against Windows, so without further information given for what the error message populating (which would help us deduce where it's coming from / if it's user / environmental / ngrok
error, or an actual issue with pyngrok
), I'm going to close this ticket as invalid. If further information is provided in terms of the executing command / environment details, or a debug trace of the actual error message that is failing to be parsed, we can reopen.
Note that NgrokLog
message syntaxes is tested here.
any time i install pyngrok on windows 10 it gives me this error
I dont know why. I tried uninstalling and reinstalling but nothing worked. Please help