-
#1
Здравствуйте. Проблема, когда регистрирую команду в бесконечном цикле, то у меня в консоли флудит такая ошибка:
RegisterCommand Error: Command «ôàëüø» already exists.
А если регистрировать его вне беск. цикла, то он у меня работает только 1 раз за 1 заход в игру
И отправляется только первая строчка отыгровки, остальное не отправляется
-
#2
Здравствуйте. Проблема, когда регистрирую команду в бесконечном цикле, то у меня в консоли флудит такая ошибка:
RegisterCommand Error: Command «ôàëüø» already exists.
А если регистрировать его вне беск. цикла, то он у меня работает только 1 раз за 1 заход в игру
И отправляется только первая строчка отыгровки, остальное не отправляется
Привет. Одну и ту же команду нельзя регистрировать несколько раз. Кидай полный код
-
#3
Здравствуйте. Проблема, когда регистрирую команду в бесконечном цикле, то у меня в консоли флудит такая ошибка:
RegisterCommand Error: Command «ôàëüø» already exists.
А если регистрировать его вне беск. цикла, то он у меня работает только 1 раз за 1 заход в игру
И отправляется только первая строчка отыгровки, остальное не отправляется
Кидай код, ну и не регистрируй команды в бесконечном цикле, так нельзя делать.
-
#4
Привет. Одну и ту же команду нельзя регистрировать несколько раз. Кидай полный код
Там 500 строк…
Кидай код, ну и не регистрируй команды в бесконечном цикле, так нельзя делать.
Ну я говорю, я пробовал регать их вне беск. цикла, но они у меня в игре работают 1 раз за 1 заход и отправляется 1 строчка отыгровки
-
AHK for Mafia.lua
20.9 KB · Просмотры: 20
-
#5
Там 500 строк…
Ну я говорю, я пробовал регать их вне беск. цикла, но они у меня в игре работают 1 раз за 1 заход и отправляется 1 строчка отыгровки
Не используй wait в обработчиках команд
-
#6
Не используй wait в обработчиках команд
в каких конкретно?
я прост не понял
-
#7
в каких конкретно?
я прост не понял
Во всех. wait в функциях-обработчиках команд использовать нельзя
-
#8
Во всех. wait в функциях-обработчиках команд использовать нельзя
Ну так это ж кд отыгровок моих..
-
#9
Ну так это ж кд отыгровок моих..
Делай в отдельном потоке
-
#10
Я команду зарегистрировал в функции main, вне беск.цикла
sampRegisterChatCommand(‘falsh’, falsh)
И вообще вне функции main сделал функцию этой команды, вот
function falsh(arg)
sampSendChat(‘/me проверка’)
wait(1000)
sampSendChat(‘/me проверка 2’)
wait(1000)
sampSendChat(‘/me проверка 3’)
end
Но при активации команды /falsh у меня в чат отправляется только первая строка отыгровки «/mе проверка
Не знаешь в чем может быть проблема?
-
#11
Я команду зарегистрировал в функции main, вне беск.цикла
sampRegisterChatCommand(‘falsh’, falsh)И вообще вне функции main сделал функцию этой команды, вот
function falsh(arg)
sampSendChat(‘/me проверка’)
wait(1000)
sampSendChat(‘/me проверка 2’)
wait(1000)
sampSendChat(‘/me проверка 3’)
endНо при активации команды /falsh у меня в чат отправляется только первая строка отыгровки «/mе проверка
Не знаешь в чем может быть проблема?
ну, используй поток
function falsh(arg)
lua_thread.create(function()
sampSendChat('/me проверка')
wait(1000)
sampSendChat('/me проверка 2')
wait(1000)
sampSendChat('/me проверка 3')
end)
end
-
#12
ну, используй поток
function falsh(arg) lua_thread.create(function() sampSendChat('/me проверка') wait(1000) sampSendChat('/me проверка 2') wait(1000) sampSendChat('/me проверка 3') end) end
этот код вставил, сохранил и зашел в игру, у меня сразу отыгровка пошла, активации нету, не работает, как исправить? у меня активации в функции main не в беск. цикле лежит
sampRegisterChatCommand(‘falsh», falsh)
-
#13
этот код вставил, сохранил и зашел в игру, у меня сразу отыгровка пошла, активации нету, не работает, как исправить? у меня активации в функции main не в беск. цикле лежит
sampRegisterChatCommand(‘falsh», falsh)
функцию вставляй вне main
-
#14
функцию вставляй вне main
Заработало
Спасибо большое
After upgrading to django 1.9 and tried creating new project.Getting following error
How should i solve this?
After upgrading to django 1.9 and creating new project following error occurred
CommandError: /home/shaastr/ehgg/manage.py already exists, overlaying a project or app into an existing directory won’t replace conflicting files
asked Feb 17, 2016 at 18:13
5
I think you have 2 versions of django installed, and both are being called when trying to start the project.
Try running pip uninstall django twice, if it runs both time then this was what was going on. Obviously, pip install django afterwards to get it working again
answered May 5, 2016 at 16:59
1
I had the same problem after using pip to install django 1.10 over an older version.
I used pip to uninstall and manually deleted the leftover django folder in the site-packages folder.
re-installed using pip, and now it is working with no problem.
answered Jan 23, 2017 at 16:34
motimoti
212 bronze badges
I am also working with docker
containers. I had this problem where it said that manage.py
already exists in the workdirectory (that I made through the Dockerfile
file) when I tried to restart the process of making a container after deleting the old one.
It did not show me where the workdirectory was made and hence could not delete the manage.py
as pointed out in the error.
The solution that worked was I changed the service name in my yml
file and gave the command with new servicenm
docker-compose run servicenm django-admin.py startproject projectnm
directory
Daniel B
3,0432 gold badges31 silver badges41 bronze badges
answered Nov 15, 2018 at 1:25
remove manage.py then re-run your django-admin startproject command, it will work
answered Nov 4, 2016 at 15:13
Make sure that if you have deleted (rm -r
) «your Django project_name» to also delete (rm
) the manage.py corresponding deleted project python file in the same repository.
answered Jun 14, 2016 at 16:05
sudo pip uninstall django
sudo rm /usr/local/lib/python2.7/dist-packages/django/ -rf
sudo pip install django==1.10
This resolved my problem.
Pang
9,344146 gold badges85 silver badges121 bronze badges
answered Apr 7, 2017 at 2:56
You need to define another directory for your new project. Not /ehgg directory.
It seems though you are creating a new project inside your old project.
And this error clearly state that, there is old setting i.e «manage.py» for your old project. Since every time a new settings manage.py created for your new project.
I hope it’s clear to you.
Thank you.
answered Aug 11, 2017 at 21:06
Check whether the project name is correct or not. Django avoids
hypens (-
) in project names.
tripleee
170k31 gold badges261 silver badges305 bronze badges
answered Sep 24, 2019 at 11:38
It can happen due to two reasons:
- You are trying to create a new folder with the exiting folder name.
- You have previously deleted a folder with this name. Deleted it for some reason. But again trying to create package with this name.
To resolve this follow
-
Rename the manage.py from your project folder.
-
Go to <%System Path%>/PycharmProjects/<%Your Project Name%>/.idea/workspace.xml
edit this file «workspace.xml» and then search with the package name you are trying to create.
delete that line and save the file.
Now try to run the command again.
I hope this helps.
Regards,
RobC
21.8k20 gold badges66 silver badges75 bronze badges
answered Nov 4, 2019 at 16:13
Содержание
- Ошибка rkeys в скрипте
- NOWLEX
- misteralen
- William_Roses
- NOWLEX
- Error: command ‘pyright.createtypestub’ already exists about pylance-release HOT 69 OPEN
- Comments (69)
- DO NOT INSTALL THIS.
- INSTALL THIS:
- Related Issues (20)
- Recommend Projects
- React
- Vue.js
- Typescript
- TensorFlow
- Django
- Laravel
- Recommend Topics
- javascript
- server
- Machine learning
- Visualization
- Recommend Org
- Microsoft
Ошибка rkeys в скрипте
NOWLEX
Участник
misteralen
Участник
William_Roses
Активный
Известный
NOWLEX
Участник
SAMPFUNCS v5.4.1-final rel.21 (SA-MP 0.3.7-R1)
Compiled: Dec 24 2018 03:13:37
Copyright (c) 2013-2018, BlastHack Team
Base address: 0x7A440000.
Initializing opcodes.
Opcodes initialized successfully. Total opcodes: 382.
Hook «CTimer::GetRealTimeScale» installed.
Hook «CPad::Update» installed.
Hook «CCamera::RenderMotionBlur» installed.
Hook «CScriptThread::AddScriptToQueue» installed.
Hook «CScriptThread::RemoveScriptFromQueue» installed.
Hook «CScriptThread::Process» installed.
Hook «WinMainLoop» installed.
Hook «CLoadingScreen::RenderSplash» installed.
Hook «CVehicle::CVehicle» installed.
Hook «CVehicle::
CVehicle» installed.
Hook «CPed::CPed» installed.
Hook «CPed::
CPed» installed.
Initializing plugins.
SF Plugin «Reconnect+.sf» loaded.
samp.dll base addres: 0x03EF0000
Hook «SAMP: CNetGame::CNetGame» installed.
Hook «SAMP: CDialog::Close» installed.
Hook «SAMP: QuitGame» installed.
Hook «SAMP: CCmdWindow::ProcessInput» installed.
[ML] (system) Session started.
[ML]
MoonLoader v.026.5-beta loaded.
[ML] Developers: FYP, hnnssy, EvgeN 1137
[ML] Copyright (c) 2016, BlastHack Team
[ML] https://www.blast.hk/moonloader/
[ML] (info) Working directory: C:gtawkiLOW PC GTAmoonloader
[ML] (system) Installing pre-game hooks.
[ML] (system) Hooks installed.
[ML] (system) Loading script ‘C:gtawkiLOW PC GTAmoonloaderAntiZeroAmmo.luac’.
[ML] (system) AntiZeroAmmo.luac: Loaded successfully.
[ML] (system) Loading script ‘C:gtawkiLOW PC GTAmoonloaderAutoReboot.lua’.
[ML] (system) ML-AutoReboot: Loaded successfully.
[ML] (system) Loading script ‘C:gtawkiLOW PC GTAmoonloaderCustom_NameTags (v 2.0).lua’.
[ML] (system) Custom NameTags: Loaded successfully.
[ML] (system) Loading script ‘C:gtawkiLOW PC GTAmoonloaderDhelper.lua’.
[ML] (system) Dhelper.lua: Loaded successfully.
[ML] (system) Loading script ‘C:gtawkiLOW PC GTAmoonloaderfogdist.lua’.
[ML] (system) fogdist.lua: Loaded successfully.
[ML] (system) Loading script ‘C:gtawkiLOW PC GTAmoonloaderGhettoHelper.luac’.
[ML] (system) GhettoHelper.luac: Loaded successfully.
[ML] (system) Loading script ‘C:gtawkiLOW PC GTAmoonloaderPlayer_Remover.lua’.
[ML] (system) Player Remover: Loaded successfully.
[ML] (system) Loading script ‘C:gtawkiLOW PC GTAmoonloaderreload_all.lua’.
[ML] (system) ML-ReloadAll: Loaded successfully.
[ML] (system) Loading script ‘C:gtawkiLOW PC GTAmoonloaderSF Integration.lua’.
[ML] (system) SF Integration: Loaded successfully.
[ML] (system) Loading script ‘C:gtawkiLOW PC GTAmoonloaderugenrl.lua’.
[ML] (system) ugenrl.lua: Loaded successfully.
[ML] (system) Installing post-load hooks.
[ML] (system) Hooks installed.
Direct3DDevice9 hook installed.
Hook «SAMP: RakPeer::HandleRPCPacket» installed.
Initializing SAMP data.
Info initialized.
Pools initialized.
Player pool initialized.
Vehicle pool initialized.
Chat initialized.
Input initialized.
Death list initialized.
Dialog initialized.
Misc data initialized.
Scoreboard initialized.
RakNet initialized.
SAMPFUNCS v5.4.1-final rel.21 (SA-MP 0.3.7-R1) completely loaded!
RegisterCommand Error: Command «clearchat» already exists.
RegisterCommand Error: Command «gc» already exists.
[ML] (system) AntiZeroAmmo.luac: Script terminated. (01CB8B24)
[ML] (system) ML-AutoReboot: Script terminated. (01CB957C)
[ML] (system) Custom NameTags: Script terminated. (01CB9A94)
[ML] (system) Dhelper.lua: Script terminated. (0E9641CC)
[ML] (system) fogdist.lua: Script terminated. (0E94A77C)
[ML] (system) GhettoHelper.luac: Script terminated. (0E94B90C)
[ML] (system) Player Remover: Script terminated. (0E94BA94)
[ML] (system) ML-ReloadAll: Script terminated. (0E9ADFE4)
[ML] (system) SF Integration: Script terminated. (0E9ADE5C)
[ML] (system) ugenrl.lua: Script terminated. (0E9AE16C)
[ML] (system) Loading script ‘C:gtawkiLOW PC GTAmoonloaderAntiZeroAmmo.luac’.
[ML] (system) AntiZeroAmmo.luac: Loaded successfully.
[ML] (system) Loading script ‘C:gtawkiLOW PC GTAmoonloaderAutoReboot.lua’.
[ML] (system) ML-AutoReboot: Loaded successfully.
[ML] (system) Loading script ‘C:gtawkiLOW PC GTAmoonloaderCustom_NameTags (v 2.0).lua’.
[ML] (system) Custom NameTags: Loaded successfully.
[ML] (system) Loading script ‘C:gtawkiLOW PC GTAmoonloaderDhelper.lua’.
[ML] (system) Dhelper.lua: Loaded successfully.
[ML] (system) Loading script ‘C:gtawkiLOW PC GTAmoonloaderdnkhelper.lua’.
[ML] (system) DNK Helper: Loaded successfully.
[ML] (system) Loading script ‘C:gtawkiLOW PC GTAmoonloaderfogdist.lua’.
[ML] (system) fogdist.lua: Loaded successfully.
[ML] (system) Loading script ‘C:gtawkiLOW PC GTAmoonloaderGhettoHelper.luac’.
[ML] (system) GhettoHelper.luac: Loaded successfully.
[ML] (system) Loading script ‘C:gtawkiLOW PC GTAmoonloaderPlayer_Remover.lua’.
[ML] (system) Player Remover: Loaded successfully.
[ML] (system) Loading script ‘C:gtawkiLOW PC GTAmoonloaderreload_all.lua’.
[ML] (system) ML-ReloadAll: Loaded successfully.
[ML] (system) Loading script ‘C:gtawkiLOW PC GTAmoonloaderSF Integration.lua’.
[ML] (system) SF Integration: Loaded successfully.
[ML] (system) Loading script ‘C:gtawkiLOW PC GTAmoonloaderugenrl.lua’.
[ML] (system) ugenrl.lua: Loaded successfully.
RegisterCommand Error: Command «gc» already exists.
[ML] (error) Dhelper.lua: C:gtawkiLOW PC GTAmoonloaderlibrkeys.lua:106: attempt to call field ‘callback’ (a nil value)
stack traceback:
C:gtawkiLOW PC GTAmoonloaderlibrkeys.lua: in function
[ML] (error) Dhelper.lua: Script died due to an error. (0E9ADE5C)
[18:59:07.427438] (system) Session started.
[18:59:07.427438] (debug) Module handle: 79FF0000
MoonLoader v.026.5-beta loaded.
Developers: FYP, hnnssy, EvgeN 1137
Источник
Error: command ‘pyright.createtypestub’ already exists about pylance-release HOT 69 OPEN
Reverting to Python extension version 2022.4.1 from 2022.6.0 resolved this issue for me, though your mileage may vary. I did not touch the Pylance extension version.
With version 2022.6.0, the issue wouldn’t appear as long as I had a project folder open and contained my work in that regard.
With version 2022.4.1, the issue was gone, regardless of my current working status.
Edit: corrected «very» to «vary» — long workdays 🙂
Angshuman-Maity commented on January 16, 2023 15
I was also facing the same issue. Reverting back to Python extension version 2022.4.1 from 2022.6.0 resolved this issue for me. Thank you .
shaunm-msft commented on January 16, 2023 13
I have the Pylance extension installed but not the Pyright extension. That is to say, the pyright extension doesn’t appear in the list of installed extensions and it doesn’t appear in the list of running extensions.
thomas-oconnell commented on January 16, 2023 7
Reverting to Python extension version 2022.4.1 from 2022.6.0 resolved this issue for me, though your mileage may very. I did not touch the Pylance extension version.
With version 2022.6.0, the issue wouldn’t appear as long as I had a project folder open and contained my work in that regard.
With version 2022.4.1, the issue was gone, regardless of my current working status.
how to download 2022.4.1 version.
Click on the extension within VS Code, click the arrow next to Uninstall, then «Install Another Version. «
trinatek commented on January 16, 2023 5
I can also report that switching back to VS Code Python Extension v2022.04.01 resolved the issue for the time-being.
(Right-click the extension on the VSCode side bar -> ‘Install Another Version. ‘ )
netcore-jroger commented on January 16, 2023 3
Reverting to Python extension version 2022.4.1 from 2022.6.0 resolved this issue for me, though your mileage may very. I did not touch the Pylance extension version.
With version 2022.6.0, the issue wouldn’t appear as long as I had a project folder open and contained my work in that regard.
With version 2022.4.1, the issue was gone, regardless of my current working status.
how to download 2022.4.1 version.
BobDenny commented on January 16, 2023 3
I just updated to the 2022.7.11291008 Pre-Release version and the problem is also gone.
babrar commented on January 16, 2023 3
This issue still persists in version 2022.8.1 -> latest release version as of Jul 5, 2022
I can confirm that downgrading to [email protected]2022.4.1 fixed it.
erictraut commented on January 16, 2023 2
Thanks for the update. Based on these clues, this looks like it’s probably a regression in the core Python extension. I wonder if the Python extension is unloading and then reloading Pylance but doing so in a way that the command ‘pyright.createtypestub’ isn’t unregistered upon unload.
arsenie-ciobanu-cko commented on January 16, 2023 1
Same thing here — just installed VS Code and getting this error:
Version: Pylance language server 2022.4.3 (pyright 88f2a424)
here’s my extensions list:
BobDenny commented on January 16, 2023 1
Same here, reverted to 2022.4.1 cured it also. Thank you @thomas-oconnell
shendin-chrobinson commented on January 16, 2023 1
I have experienced the same today, and downgrading the core Python extension to v2022.4.1 fixed it for me.
monkeycc commented on January 16, 2023 1
omidshojaee commented on January 16, 2023 1
Had this issue and solved it by reverting to 2022.7.11381657 and then installing the latest pre-release (2022.7.11381925) again.
chausner-audeering commented on January 16, 2023 1
I switch to Python extension pre-release v2022.7.11311004, all of ok.
I think I started to run into this issue after the vscode update today from 1.67.1 to 1.67.2. Installing the pre-release version of the Python extension also fixed it for me.
Elypha commented on January 16, 2023 1
for my case, I have to revert Python to v2022.4.1 and Pylance to v2022.4.3 as well
hope that helps
heejaechang commented on January 16, 2023 1
this will be fixed in python extension once new version is released.
heejaechang commented on January 16, 2023 1
@debonte, it is not just that command, it fails on that because that is the first command we register. we need to skip registering all commands and that will make none of our command to work.
shaunm-msft commented on January 16, 2023 1
@debonte,
I am using Pylance v2022.10.10 now. I upgrade code-insiders and all extensions regularly.
I haven’t encountered this issue that I reported in a long time. I think that last post from me was stuck in GitHub’s email processing for a really long time. I haven’t commented on this issue since May.
judej commented on January 16, 2023
Thanks for the report. This can happen if Pyright and Pylance extensions are both installed. Is this the case for you? If so, could you please uninstall one of them?
debonte commented on January 16, 2023
Discussed this with Eric today. When both Pyright and Pylance are installed, Pyright will detect that Pylance is present and disable itself. Best guess is that this exception happens in cases where Pyright is already installed and the user installs Pylance after Pyright has activated.
In any case, nothing has changed with this logic on our side recently. But there has clearly been a change in behavior since we’ve seen this exception in our stack traces over the past couple weeks and now a user has reported it.
Our theory is that the LSP 3.17 upgrade included a change to throw an exception when an extension attempts to register an already registered command, whereas it used to be silent. Plan is to just catch the exception.
debonte commented on January 16, 2023
I have the Pylance extension installed but not the Pyright extension.
Wow, ok. Can you send us a list of the extensions you have installed? You can dump the list of extensions on the command line using code —list-extensions
shaunm-msft commented on January 16, 2023
E:>code-insiders —list-extensions
ms-dotnettools.vscode-dotnet-runtime
ms-python.python
ms-python.vscode-pylance
ms-toolsai.jupyter
ms-toolsai.jupyter-keymap
ms-toolsai.jupyter-renderers
ms-vscode-remote.remote-wsl
ms-vscode.cpptools
ms-vscode.powershell-preview
VisualStudioExptTeam.intellicode-api-usage-examples
VisualStudioExptTeam.vscodeintellicode-completions
VisualStudioExptTeam.vscodeintellicode-insiders
Sanqui commented on January 16, 2023
Also ran into this problem today after setting up a new VS Code instance and syncing my settings. Here’s my list of extensions:
Version: Pylance language server 2022.4.3 (pyright 88f2a424)
Finerestaurant commented on January 16, 2023
I also head same probelm after changing conda virtual environment. Here’s my extension lists.
(base) C:Usersuser>code —list-extensions
cschlosser.doxdocgen
Equinusocio.vsc-community-material-theme
Equinusocio.vsc-material-theme
equinusocio.vsc-material-theme-icons
jeff-hykin.better-cpp-syntax
ms-python.python
ms-python.vscode-pylance
ms-toolsai.jupyter
ms-toolsai.jupyter-keymap
ms-toolsai.jupyter-renderers
ms-vscode-remote.remote-containers
ms-vscode-remote.remote-ssh
ms-vscode-remote.remote-ssh-edit
ms-vscode-remote.remote-wsl
ms-vscode.cmake-tools
ms-vscode.cpptools
ms-vscode.cpptools-extension-pack
ms-vscode.cpptools-themes
oderwat.indent-rainbow
twxs.cmake
55octet commented on January 16, 2023
zachsiegel-capsida commented on January 16, 2023
Same issue, reverting Python core version solved it for me too.
progrunman commented on January 16, 2023
I’m also v2022.6.0 and the problem occurred after moving the source folder of the existing project. The problem went away when I restarted VSCode after a few minutes. However, the warning below is still occurring.
[Warn] (14348) stubPath ‘my project folder path’typings is not a valid directory.
The ‘typings’ folder was not created by me and does not exist in the my source folder. So, I don’t know what that is.
Kein commented on January 16, 2023
Same issue.
I have 3 versions of Python installed, 3.9.6, 3.10 and 3.8.5 but only switching to 3.8.5 causes this issue.
edwardchoijc commented on January 16, 2023
Same issue. My full log is below.
[Info — 11:30:50 AM] (78228) Pylance language server 2022.4.3 (pyright 88f2a424) starting
[Info — 11:30:50 AM] (78228) Server root directory: /HOME_PATH/.vscode/extensions/ms-python.vscode-pylance-2022.4.3/dist
[Warn — 11:30:50 AM] (78228) stubPath /MY_PROJECT_PATH/typings is not a valid directory.
[Info — 11:31:08 AM] (78246) Pylance language server 2022.4.3 (pyright 88f2a424) starting
[Info — 11:31:08 AM] (78246) Server root directory: /HOME_PATH/.vscode/extensions/ms-python.vscode-pylance-2022.4.3/dist
[Error — 11:31:08 AM] Server initialization failed.
Error: command ‘pyright.createtypestub’ already exists
at o.registerCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:83:29716)
at Object.registerCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:97:30972)
at t.ExecuteCommandFeature.register (/HOME_PATH/.vscode/extensions/ms-python.python-2022.6.1/out/client/extension.js:2:2221856)
at t.ExecuteCommandFeature.initialize (/HOME_PATH/.vscode/extensions/ms-python.python-2022.6.1/out/client/extension.js:2:2221435)
at S.initializeFeatures (/HOME_PATH/.vscode/extensions/ms-python.python-2022.6.1/out/client/extension.js:2:2174000)
at S.doInitialize (/HOME_PATH/.vscode/extensions/ms-python.python-2022.6.1/out/client/extension.js:2:2161924)
at async S.start (/HOME_PATH/.vscode/extensions/ms-python.python-2022.6.1/out/client/extension.js:2:2158939)
at async S.$start (/HOME_PATH/.vscode/extensions/ms-python.python-2022.6.1/out/client/extension.js:2:2165739)
at async t.Delayer. (/HOME_PATH/.vscode/extensions/ms-python.python-2022.6.1/out/client/extension.js:2:2164010)
[Error — 11:31:08 AM] Pylance client: couldn’t create connection to server.
code —list-extensions
2gua.rainbow-brackets
aaron-bond.better-comments
alefragnani.project-manager
DotJoshJohnson.xml
eamodio.gitlens
Equinusocio.vsc-community-material-theme
Equinusocio.vsc-material-theme
equinusocio.vsc-material-theme-icons
GrapeCity.gc-excelviewer
KevinRose.vsc-python-indent
Lencerf.beancount
mhutchie.git-graph
MS-CEINTL.vscode-language-pack-zh-hans
ms-python.python
ms-python.vscode-pylance
ms-toolsai.jupyter
ms-toolsai.jupyter-keymap
ms-toolsai.jupyter-renderers
ms-vscode-remote.remote-wsl
njpwerner.autodocstring
Shan.code-settings-sync
Tyriar.sort-lines
vscode-icons-team.vscode-icons
And I found a very strange problem, that is, with the same environment, only some projects had this situation, which is the other projects had not.
daydaychen commented on January 16, 2023
I switch to Python extension pre-release v2022.7.11311004, all of ok.
Gakubuchi commented on January 16, 2023
I have the same issue (and also some of my students).
The list of extensions I have is:
I haven’t tried to revert to an older version of Python extension.
I hope it is useful
.
longguzzz commented on January 16, 2023
I have this problem after I set my defaultProfile with my self-configure commandline.
And I solve this problem by setting the terminal with the default one. (PowerShell)
citron commented on January 16, 2023
Same problem here after a fresh installation of vscode and a sync with my other vscode configurations.
fritol commented on January 16, 2023
same here. removed all extensions. reinst VS code. Still the same problem. In addition cannot run python files in the terminal only notebook exec works! wtf!
strobelight commented on January 16, 2023
I also received same error when using OSX ssh to debug remotely, but noticed a reload was required of python extension, so did that, and the error went away.
python v2022.6.2
pylance v2022.5.1
TaridaGeorge commented on January 16, 2023
For me, I think that this error started to occur after I installed pyright by mistake without knowing that pylance has it already in it and after I’ve uninstalled the pyright extension I started to notice this error. So I guess that someone could test this case: Make a fresh install of VSCode — don’t sync nothing — install pylance — install pyright — uninstall pyright see if the error shows up.
netcore-jroger commented on January 16, 2023
DO NOT INSTALL THIS.
INSTALL THIS:
commented on January 16, 2023
Had this issue and solved it by reverting to 2022.7.11381657 and then installing the latest pre-release (2022.7.11381925) again.
This worked for me, thank you so much 😄
khurchla commented on January 16, 2023
I had this error but it went away after I did the following then restarted VSCode.
(possibly a restart of VSCode alone would have done it)
- Shell Command: Uninstall ‘code’ command from PATH
- Shell Command: Install ‘code’ command from PATH
this is what I had installed when it first occurred:
- VS code 1.67.7 MacOS Universal
- Miniconda3 macOS Apple M1 64-bit bash
- extensions:
ecmel.vscode-html-css
ms-python.python
ms-python.vscode-pylance
ms-toolsai.jupyter
ms-toolsai.jupyter-keymap
ms-toolsai.jupyter-renderers
zptang1210 commented on January 16, 2023
I am also experiencing this problem on both my Windows and MacOS computers.
ingmarschuster commented on January 16, 2023
For me also: Reverting to Python extension version 2022.4.1 resolved the problem
dziyaee commented on January 16, 2023
Same issue here, completely fresh install of vscode. Only happens the first time when I try to switch the Python interpreter to different conda envs.
Also getting a whole bunch of errors in the output
I can confirm that downgrading to [email protected] fixed it.
spectatorzhang commented on January 16, 2023
Same problem with me here, totally new installed latest VSCode and latest stable extensions.
Happens when opening every .py file:
Known solution: downgrade Python extension (not Pylance) to 2022.4.X version would fix it.
I only installed Python, Pylance and Jupyter in VSCode, so the problem has nothing to do with other extensions.
fritol commented on January 16, 2023
same old same old
spectatorzhang commented on January 16, 2023
Seems like this issue has been solved after Python extension releases 2022.6.3 upgrade.
meflouu commented on January 16, 2023
At least for me, the issue persists. In fact, I just got here after updating to 2022.6.3
Seems like this issue has been solved after Python extension releases 2022.6.3 upgrade.
debonte commented on January 16, 2023
Yes, it’s still happening in the latest build of the Python extension. We’re actively looking at this.
spectatorzhang commented on January 16, 2023
The problem may be with Python extension, not Pylance itself.
Yes, it’s still happening in the latest build of the Python extension. We’re actively looking at this.
debonte commented on January 16, 2023
The problem may be with Python extension, not Pylance itself.
Yes, it’s an issue with the way that Python is managing the LSP connection with Pylance. But the Pylance team is driving the investigation, so it makes sense for the issue to stay on our issue tracker.
lind-ric commented on January 16, 2023
Hoping this gets resolved soon! best of luck to the mega minds working on this!!
RuimanDiaz commented on January 16, 2023
Is the Python and Pylance extension, disable one.
jibzus commented on January 16, 2023
Reverting to Python extension version 2022.4.1 from 2022.6.0 resolved this issue for me, though your mileage may very. I did not touch the Pylance extension version.
With version 2022.6.0, the issue wouldn’t appear as long as I had a project folder open and contained my work in that regard.
With version 2022.4.1, the issue was gone, regardless of my current working status.
how to download 2022.4.1 version.
Click on the extension within VS Code, click the arrow next to Uninstall, then «Install Another Version. «
This seemed to work for me
mrinmayik commented on January 16, 2023
Reverting to Python extension version 2022.4.1 from 2022.6.0 resolved this issue for me, though your mileage may very. I did not touch the Pylance extension version.
With version 2022.6.0, the issue wouldn’t appear as long as I had a project folder open and contained my work in that regard.
With version 2022.4.1, the issue was gone, regardless of my current working status.
how to download 2022.4.1 version.
Click on the extension within VS Code, click the arrow next to Uninstall, then «Install Another Version. «
Worked for me too. Thanks for the solution @thomas-oconnell !!
locture commented on January 16, 2023
The issue persists on 2022.10.1 on vscode 1.69.2.
Reverting to 2022.4.1 solved the issue.
prerna08 commented on January 16, 2023
The issue persists on 2022.7.40 VSC Version: 1.69.2 2022.7.40
Reverting to 2022.4.1 resolved it for me.
astro313 commented on January 16, 2023
Reverting to 2022.4.1 resolved it for me.
berkaycagir commented on January 16, 2023
Why was this issue closed? This is still happening, also had to revert to 2022.4.1.
omidshojaee commented on January 16, 2023
jweyrich commented on January 16, 2023
this will be fixed in python extension once new version is released.
ms-python.python has a released v2022.10.0 (3 weeks ago) and v2022.10.1 (2 weeks ago), but the issue still happens. Not sure what exacly to do — maybe just downgrade pylance temporarily as suggested by a user above?
fasapa commented on January 16, 2023
It’s still happening with version v2022.12.1. Brand new vscode installation. Reverting to v2022.4.1 solved it.
sammyyap98 commented on January 16, 2023
I still got the same error after trying with Pylance v2022.08.30 and Python v2022.04.01
Is there any other possible solution.
debonte commented on January 16, 2023
@heejaechang, while waiting for this to get fixed properly, would it make sense for Pylance to skip registering the command if it’s already registered? Rich suggested this in scrum today.
Yura52 commented on January 16, 2023
I have the same issue with Python==v2022.12.1 and Pylance==v2022.8.40. More details:
- the working folder is located on a remote machine, i.e. VSCode connects to it via SSH
- I have two laptops and I am migrating from the old one to the new one
- on the old one, it all works fine, Pylance is operating on the remote working directory without issues
- on the new one, this problem occurs
heejaechang commented on January 16, 2023
@Yura52 is it repro consistently? if so, can you provide more detail repro steps so we can try as well?
@babrar @jibzus @mrinmayik @locture @prerna08 @astro313 @berkaycagir @jweyrich @sammyyap98 @fasapa if this happen consistently, can you provide a repro step we can follow? currently, we fixed ones we know, but it looks like there are more ways to make it happen.
@midshojaee it is closed since we fixed ones that are reported. now, we found out there are multiple ways to make this exception to throw. so far, we fixed 4 different issues, but it looks like there are even more cases. it would be very helpful if you can provide repro steps if it consistently happening so we can take a look.
we thank you for the reporting, but it would be even more helpful if you can provide us detail repro steps we can follow to repro the issues.
heejaechang commented on January 16, 2023
related issue on python repo that can help us investigate the issue — microsoft/vscode-python#19626
debonte commented on January 16, 2023
@heejaechang, I found a scenario that repros this error consistently:
Python: v2022.17.12791010
Pylance: v2022.10.11
Pyright: v1.1.274
- Open a Python file or notebook.
- Disable Pylance; enable Pyright
- «Developer: Reload Window» via the command palette
- Wait for Pyright to initialize. I was testing this by seeing that hover worked.
- Disable Pyright; Enable Pylance
Result: Pylance fails with «Error: command ‘pyright.createtypestub’ already exists»
shaunm-msft commented on January 16, 2023
debonte commented on January 16, 2023
I have Pylance (v2022.4.4-pre.1) installed but not Pyright.
@shaunm-msft, ok, yes, we’ve found some ways that this can happen with just Pylance installed as well.
Although this issue persists, some of the scenarios that cause it have been fixed. 2022.4.4-pre.1 is very old. Are you also running an old version of the Python extension? If so, you may find that upgrading the Python extension in particular improves the situation.
- feature request: auto-imports: exclude some modules from auto-import suggestion
- pylance issue HOT 1
- Cross-user portable way to make PyLance check user Python packages HOT 2
- Pylance: unreachable code when using threads HOT 2
- Disable type checking for a package but keep autcompletion HOT 3
- Cannot suppress Pylance diagnostic errors in Python library files when try to set up configuration options HOT 6
- Automatic docstring word wrapping HOT 3
- Can the extension only download binary specific to my operating system and CPU architecture? HOT 1
- Provides code hints based on inferred types HOT 1
- Provide improved support for pandas HOT 2
- Typing problem on indexing pandas DataFrame with a Callable HOT 3
- Show Definition Preview Hover doesn’t pop up in some situation HOT 3
- (Python) «Find All References» on any __init__ shows every constructor for every class HOT 2
- Add more fine-grained code action kinds for `refactor.extract` HOT 2
- Problem with hihglight code in dif comparison mode for python HOT 3
- Guys, in VERY simple terms, not tech speak, how do I turn off the «reportOptionalMemberAccess» rule? HOT 1
- Issue with code being displayed darkly in Visual Studio Code HOT 2
- Module changes in interactive window are not working HOT 3
- Pylance not killing python processes it spawns HOT 2
- Unable to properly type hint Django models when adding a Meta class HOT 4
Recommend Projects
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
TensorFlow
An Open Source Machine Learning Framework for Everyone
Django
The Web framework for perfectionists with deadlines.
Laravel
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
Recommend Topics
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
server
A server is a program made to process requests and deliver data to clients.
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Visualization
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
Recommend Org
We are working to build community through open source technology. NB: members must have two-factor auth.
Microsoft
Open source projects and samples from Microsoft.
Источник
find
is finding your files twice: in the place where they started, and where you moved them to. That means it ends up running:
mv -i 3DBGB_run/x.template 3DBGB_run/x.template
and produces the error you see.
find
sees files «live» as it goes — it doesn’t build up a list in advance and then run the command for everything in the list. The order that it looks at files and directories is undefined (it’s likely to come from the filesystem), so it will happen for every file that’s examined before the directory you move it into.
Because find
doesn’t know what you’re doing in the -exec
, it can’t compensate for it. You can do a couple of things about this:
- Exclude the directories from the search space:
find . -name '*.template' -path "./3DBGB_run" -prune -o -exec mv -i {} ./3DBGB_run ;
. The-path
part matches the directory you’re moving things into, and-prune
then excludes that whole tree from recursion.-o
causes the rest of the command (your original-exec
) to run the rest of the time. The command never runs on files inside the directory. (This is an explicit example in the manual of GNUfind
) -
Build up the list in advance of the move. This may be better in some circumstances, but if your filenames have spaces or other
IFS
characters then it doesn’t work out so well. If that doesn’t apply, something like:files=$(find . -name '*.template') mv "${files[@]}" 3DBGB_run
will also work.
When you’re using find -exec
, ending the command with +
instead of ;
will make find
run the minimum number of commands, collecting multiple arguments into each execution, which is more efficient. Sometimes that doesn’t work for a particular command, but it would be fine here. If this is a one-time command it doesn’t really matter, but if you run it a lot then saving processes will save time.
Hi,
When I try to create a menu item inside of Tools menu of Visual Studio 2005, I get the error in the subject of this message.
Follow the OnConnection method.
Any suggest will be accepted!
Thank you!
public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom)
{
try
{
_applicationObject = (DTE2)application;
_addInInstance = (AddIn)addInInst;
Command _command = null;
if (connectMode == ext_ConnectMode.ext_cm_Startup)
{
object[] contextGUIDS = new object[] { };
Commands2 commands = (Commands2)_applicationObject.Commands;
try
{
Microsoft.VisualStudio.CommandBars.CommandBar menuBarCommandBar = ((Microsoft.VisualStudio.CommandBars.CommandBars)_applicationObject.CommandBars)[«MenuBar»];
//Find the Tools command bar on the MenuBar command bar:
CommandBarControl toolsControl = menuBarCommandBar.Controls[«Tools»];
CommandBarPopup toolsPopup = (CommandBarPopup)toolsControl;
try
{
//Add a command to the Commands collection:
Command command = commands.AddNamedCommand2(_addInInstance, «UIObjectsGenerator», «Gerador de Controles UI», «Gerador de Controles UI», true, 59, ref contextGUIDS, (int)vsCommandStatus.vsCommandStatusSupported + (int)vsCommandStatus.vsCommandStatusEnabled, (int)vsCommandStyle.vsCommandStylePictAndText, vsCommandControlType.vsCommandControlTypeButton);
//Add a control for the command to the tools menu:
if ((command != null) && (toolsPopup != null))
{
object res = command.AddControl(toolsPopup.CommandBar, 1);
((Command)res).AddControl(toolsPopup, 1);
}
}
catch (Exception e)
{
}
}
catch (Exception e)
{
}
}
}
catch (Exception ex)
{
}
}