Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 10, VSCode, not enough values to unpack error in latest release with UNC path #4

Closed
JSkier21 opened this issue Jan 13, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@JSkier21
Copy link

Hi Eric,

Works great in Linux, however running into this error in Windows 10, VSCode below when using a UNC path (ie \server\share\rule.rules). From what I can tell, I think it's an issue with jsonrpc specifically (I can put in an issue over there if that makes sense to you).

I will put a PR in shortly to note this in the README.

Basically, any UNC paths get treated as file:///server/share/rule.rules.

The workaround is to use a mapped drive letter reference to open the file (or folder with rules in it). X:\Rules\rule.rules, instead of the UNC path. This works as expected.

Screenshot:
image

Traceback:
Traceback (most recent call last): File "C:\Python310\lib\site-packages\suricatals\langserver.py", line 99, in handle handler(request) File "C:\Python310\lib\site-packages\suricatals\langserver.py", line 322, in serve_onSave filepath = path_from_uri(uri) File "C:\Python310\lib\site-packages\suricatals\jsonrpc.py", line 24, in path_from_uri _, path = uri.split("file:///", 1) ValueError: not enough values to unpack (expected 2, got 1)

@regit
Copy link
Member

regit commented Jan 13, 2022

Thanks for the bug report. I'm going to try to fix this.

@regit regit self-assigned this Jan 13, 2022
@regit regit added the bug Something isn't working label Jan 13, 2022
@regit
Copy link
Member

regit commented Jan 15, 2022

@JSkier21 could you confirm that v0.5.1 is fixing the problem in your case ?

@JSkier21
Copy link
Author

Confirmed working with reference to UNC path. Thank you @regit for fixing so quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants