Closed fjh3646 closed 2 years ago
我也遇到了相同的问题, Windows, Wolfram 13.0.0
可以试一下 develop
分支吗?
ok,这是develop分支的所有报错信息:
PacletInstall::newervers: A paclet named ZeroMQLink with a newer version number (1.2.5) is already installed. If you wish to install an older version, use PacletUninstall to remove the existing version first, or call PacletInstall with ForceVersionInstall->True.
Get::noopen: Cannot open ZeroMQLink`.
[INFO 2021-12-20T21:23:14] Initializing Wolfram Language Server
Get::noopen: Cannot open ZeroMQLinkLoader`.
[INFO 2021-12-20T21:23:21] Language server is connecting the client through
socket.
[INFO 2021-12-20T21:23:21] Server listening from port 6536...
DataType`TypeCheck::mispat:
SocketConnect[6536, TCP] doesn't match the pattern of "client" in
WolframLanguageServer`Server`Private`WorkState.
[ERROR 2021-12-20T21:23:21] Which[SocketReadyQ[SocketConnect[6536, TCP]],
WolframLanguageServer`Server`Private`handleMessageList[WolframLanguageServer`Ser
ver`Private`ReadMessages[SocketConnect[6536, TCP]],
WolframLanguageServer`Server`Private`WorkState[<|initialized -> False,
openedDocs -> <||>, debugSession ->
WolframLanguageServer`Server`Private`DebugSession[<|initialized -> False, server
-> Null, client -> Null|>], scheduledTasks -> {}, caches ->
<|textDocument/signatureHelp -> <||>, textDocument/documentSymbol -> <||>,
textDocument/documentLink -> <||>, textDocument/documentColor -> <||>,
textDocument/codeLens -> <||>, textDocument/publishDiagnostics -> <||>|>,
pendingServerRequests -> <||>, config -> <|configFileConfig ->
WolframLanguageServer`Server`Private`loadConfig[]|>, client ->
SocketConnect[6536, TCP]|>]],
WolframLanguageServer`Server`Private`DebugSession[<|initialized -> False, server
-> Null, client -> Null|>][server] =!= Null &&
WolframLanguageServer`Server`Private`DebugSession[<|initialized -> False, server
-> Null, client -> Null|>][client] === Null &&
Length[WolframLanguageServer`Server`Private`DebugSession[<|initialized -> False,
server -> Null, client -> Null|>][server][ConnectedClients]] > 0, {Continue,
DataType`ReplaceKey[WolframLanguageServer`Server`Private`WorkState[<|initialized
[INFO 2021-12-20T21:23:21] Closing socket connection...
DataType`TypeCheck::mispat:
SocketConnect[6536, TCP] doesn't match the pattern of "client" in
WolframLanguageServer`Server`Private`WorkState.
[ERROR 2021-12-20T21:23:21] Server stopped abnormally.
[ERROR 2021-12-20T21:23:21] Which[SocketReadyQ[SocketConnect[6536, TCP]],
WolframLanguageServer`Server`Private`handleMessageList[WolframLanguageServer`Ser
ver`Private`ReadMessages[SocketConnect[6536, TCP]],
WolframLanguageServer`Server`Private`WorkState[<|initialized -> False,
openedDocs -> <||>, debugSession ->
WolframLanguageServer`Server`Private`DebugSession[<|initialized -> False, server
-> Null, client -> Null|>], scheduledTasks -> {}, caches ->
<|textDocument/signatureHelp -> <||>, textDocument/documentSymbol -> <||>,
textDocument/documentLink -> <||>, textDocument/documentColor -> <||>,
textDocument/codeLens -> <||>, textDocument/publishDiagnostics -> <||>|>,
pendingServerRequests -> <||>, config -> <|configFileConfig ->
WolframLanguageServer`Server`Private`loadConfig[]|>, client ->
SocketConnect[6536, TCP]|>]],
WolframLanguageServer`Server`Private`DebugSession[<|initialized -> False, server
-> Null, client -> Null|>][server] =!= Null &&
WolframLanguageServer`Server`Private`DebugSession[<|initialized -> False, server
-> Null, client -> Null|>][client] === Null &&
Length[WolframLanguageServer`Server`Private`DebugSession[<|initialized -> False,
server -> Null, client -> Null|>][server][ConnectedClients]] > 0, {Continue,
DataType`ReplaceKey[WolframLanguageServer`Server`Private`WorkState[<|initialized
我这边没有问题,你可以运行一下这几个命令吗 ?
PacletObject["ZeroMQLink"]
FindFile["ZeroMQLink`"]
<<ZeroMQLink`
似乎是因为没有安装ZeroMQLink导致的,我用PacletInstall安装后不再出现上述的报错了。但是现在会报新的错误:
[INFO 2021-12-25T22:08:50] Initializing Wolfram Language Server
[INFO 2021-12-25T22:08:55] Language server is connecting the client through
socket.
SocketConnect::zmqexception:
A ZeroMQLink exception was thrown -
No connection could be made because the target machine actively refused
it.
(code 10061)
[ERROR 2021-12-25T22:08:57] Cannot connect to client via socket.
我怀疑是Windows系统设置的问题, 稍后我在Linux上测试一次试试.
你需要安装 ZeroMQLink 1.1.22
版本 并且禁用 1.2.*
版
现在的配置:
Wolfram Language 13.0.0 Engine for Linux x86 (64-bit)
Copyright 1988-2021 Wolfram Research, Inc.
In[1]:= PacletObject["ZeroMQLink"]
Out[1]= PacletObject[ZeroMQLink, 1.1.22, <>]
In[2]:= FindFile["ZeroMQLink`"]
Out[2]= /home/yqwu/.WolframEngine/Paclets/Repository/ZeroMQLink-1.1.22/Kernel/ZeroMQLink.wl
In[3]:= <<ZeroMQLink`
In[4]:=
新的报错:
❯ wolframscript -f init.wls
PacletInstall::newervers: A paclet named ZeroMQLink with a newer version number (1.2.5) is already installed. If you wish to install an older version, use PacletUninstall to remove the existing version first, or call PacletInstall with ForceVersionInstall->True.
[INFO 2021-12-28T07:34:58] Initializing Wolfram Language Server
[INFO 2021-12-28T07:35:01] Language server is connecting the client through
socket.
SocketConnect::zmqexception:
A ZeroMQLink exception was thrown - Connection refused (code 111)
[ERROR 2021-12-28T07:35:01] Cannot connect to client via socket.
你有试过从 vscode 端开启嘛? https://github.com/kenkangxgwe/vscode-lsp-wl
如果你只运行 init.wls
没有编辑器, 是会连不上的。
官方解决了这个问题,请升级至最新的 ZeroMQLink 版本:
PacletInstall["ZeroMQLink"]
参考:https://github.com/kenkangxgwe/lsp-wl/wiki#working-with-mathematica-123130
win 12.3.1运行init.wls 出错