Python Emmet - Notepad++“未知异常”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/26110973/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 00:06:32  来源:igfitidea点击:

Emmet - Notepad++ "Unknown exception"

pythonnotepad++emmet

提问by Apu889

Every time I'm trying to use Emmet's Expand Abbreviationit gives me errors. First a pop up with Unknown Exceptionand then another pop up with python script plugin did not accept the script.

每次我尝试使用Emmet 时,Expand Abbreviation它都会给我错误。首先弹出一个 ,Unknown Exception然后另一个弹出python script plugin did not accept the script

I tried reinstalling Notepad++ but that didn't help.

我尝试重新安装 Notepad++ 但这没有帮助。

I'm running Windows 8 x64 & Notepad++ 6.6.9. This is the first time I'm using Emmet, after recently used the old Zen Coding. (Which works flawlessly.)

我正在运行 Windows 8 x64 和 Notepad++ 6.6.9。这是我第一次使用 Emmet,最近使用了旧的 Zen Coding。(它完美无缺。)

I have python 2.7 installed, if that necessary too.

如果有必要,我也安装了 python 2.7。

采纳答案by David

I had the same problem as you. This is the solution which worked for me:

我和你有同样的问题。这是对我有用的解决方案:

Basically, the problem lies in the Python Scriptplugin which will be automatically installed with Emmet.

基本上,问题出在Python Script插件上,该插件将随 Emmet 自动安装。

Go to this link:
http://sourceforge.net/projects/npppythonscript/files/Python%20Script%200.9.2.0/
and download PythonScript_full_0.9.2.0 package.

转到此链接:
http: //sourceforge.net/projects/npppythonscript/files/Python%20Script%200.9.2.0/
并下载 PythonScript_ full_0.9.2.0 包。

Replace Notepad++'s Python package with PythonScript_full_0.9.2.0 and unpack the archive in Notepad++'s MAIN directory. (This is where notepad++.exeis.)
(Do NOT unpack the archive inside the pluginsdirectory. That will not work. The python27.dllfile needs to be in the same directory where notepad++.exeis.)

用 PythonScript_ full_0.9.2.0替换 Notepad++ 的 Python 包并解压 Notepad++ 的 MAIN 目录中的存档。(这是在哪里notepad++.exe。)
(不要解压缩plugins目录中的档案。那将不起作用。python27.dll文件需要在同一个目录中notepad++.exe。)

I am using Notepad++ v6.6.9 and it works now.

我正在使用 Notepad++ v6.6.9,现在可以使用了。

回答by TonyT

There is a newer version (PythonScript_1.0.8.0.msi ) available here:

这里有一个更新的版本(PythonScript_1.0.8.0.msi):

http://sourceforge.net/projects/npppythonscript/files/latest/download?source=files

http://sourceforge.net/projects/npppythonscript/files/latest/download?source=files

I had the exact same issue on two different computers, one Windows 7 and one Windows 8, both 64bit. I installed the MSI on the Win8 computer and it fixed the problem.

我在两台不同的计算机上遇到了完全相同的问题,一台 Windows 7 和一台 Windows 8,都是 64 位。我在 Win8 计算机上安装了 MSI,它解决了问题。

回答by jcwareham

Check to see if it might be just the shortcut keys that aren't working by going to menuBar>plugins>emmet>expandAbbreviation. If clicking on that works after typing in some emmetsyntax, but not when you type the shortcut key, reassign the shortcut keys. Here's what I did:

检查是否可能只是快捷键无法通过转到menuBar>plugins>emmet>expandAbbreviation. 如果在键入某些emmet语法后单击该按钮有效,但在键入快捷键时无效,请重新分配快捷键。这是我所做的:

Look specifically at menuBar>settings>shortcutMapper

具体看 menuBar>settings>shortcutMapper

under Main Menu-> "Insert Blank Line Above Current"

在下面 Main Menu-> "Insert Blank Line Above Current"

and see that ctrl+alt+enteris already assigned there.

并看到ctrl+ alt+enter已经在那里分配。

Change that to something else (I did ctrl+alt+up), and you'll see that your shortcut keys are working for emmet.

将其更改为其他内容(我做了ctrl+ alt+ up),您将看到您的快捷键适用于emmet.

回答by user5563802

You have 4 objects (2 files and 2 directories) that you have to sort:

您必须对 4 个对象(2 个文件和 2 个目录)进行排序:

  • Put the python27.dllfile into the MAIN directory like so: %ProgramFiles(x86)%\notepad++\python27.dll

  • Put the others (docdirectory, PythonScriptdirectory, PythonScript.dllfile) into %ProgramFiles(x86)%\notepad++\plugins\.

  • python27.dll文件放入 MAIN 目录,如下所示:%ProgramFiles(x86)%\notepad++\python27.dll

  • 将其他(doc目录、PythonScript目录、PythonScript.dll文件)放入%ProgramFiles(x86)%\notepad++\plugins\.

This works for Windows 8.

这适用于 Windows 8。

Also change the key shorcut by ctrl+ Eor some other.

还可以通过ctrl+E或其他更改键快捷方式。