发表文章

[Python] 安装]绒不与 pyflakes 合作 [setup] Linter not working with pyflakes[SublimeLinter3]

michk 2017-10-9 59

我运行 Ubuntu 14.04 与崇高的文本 3, SublimeLinter 和 pyflakes。

绒无法正常工作, 并且在调试模式下运行并重新启动 ST 等许多其他操作时, 将在控制台中打印以下内容:

Traceback (most recent call last):
  File "/home/user/.config/sublime-text-3/Packages/SublimeLinter/lint/util.py", line 247, in generate_color_scheme_async
    scheme_text = sublime.load_resource(scheme)
  File "/opt/sublime_text_3/sublime.py", line 192, in load_resource
SublimeLinter: pyflakes: main.py <builtin> 
    raise IOError("resource not found")
OSError: resource not found
原文:

I am running Ubuntu 14.04 with Sublime Text 3, SublimeLinter and pyflakes.

The linter doesn't work and when running in debug mode and restarting ST, among many other things, the following is printed in the console:

Traceback (most recent call last):
  File "/home/user/.config/sublime-text-3/Packages/SublimeLinter/lint/util.py", line 247, in generate_color_scheme_async
    scheme_text = sublime.load_resource(scheme)
  File "/opt/sublime_text_3/sublime.py", line 192, in load_resource
SublimeLinter: pyflakes: main.py <builtin> 
    raise IOError("resource not found")
OSError: resource not found
相关推荐
最新评论 (11)
braver 2017-10-9
1

似乎在这里工作得很好。您是否遵循了所有的设置步骤, 并在 SublimeLinter-pyflakes 回购中寻找更多信息, 或者可能与您的设置相关的已知问题?

原文:

Seems to work just fine here. Have you followed all the setup steps and looked in the SublimeLinter-pyflakes repo for more info and perhaps known issues that may be related to your setup?

michk 2017-10-9
2

通过软件包控制安装下, 我按照这些指令进行 SublimeLinter, pip install pyflakes 并在插件安装下使用这些指令安装 pyflakes。所以我想我安装了正确的。

我没有看到任何类似的错误, 在 pyflakes 回购, 所以将发布一个问题, 以及和报告在这里, 当希望解决。

原文:

I followed these instructions under Installing via Package Control for SublimeLinter, did pip install pyflakes and then installed pyflakes using these instructions under Plugin Installation. So I think I installed it correctly.

I don't see any similar errors at the pyflakes repo, so will post an issue there as well and report back here when hopefully sorted out..

braver 2017-10-9
3

@michK只是为了确定: 您是否也安装了https://packagecontrol.io/packages/SublimeLinter-pyflakes

我恐怕你分享的日志输出没有告诉我任何事情, 但我不是这里的专家。

原文:

@michK Just to be sure: did you also install https://packagecontrol.io/packages/SublimeLinter-pyflakes?

I''m afraid the log output you shared doesn't tell me anything, but I'm not the expert here.

michk 2017-10-9
4

@braver是的, 但我现在注意到, 我可能没有正确地设置绒可执行文件的路径。将尝试这样做, 并报告回来。

原文:

@braver yes I did, but I notice now that I might not have set up the path to the linter executable properly. Will try to do that and report back.

michk 2017-10-9
5

我注意到了绒的 "工作"

在 ST 它似乎显示错误, 我可以浏览的错误, 但它没有注意 #TODO, 不知道这是否与我在第一条消息中引用的错误有关。

顺便说一下, 您是否知道绒可执行文件在 Linux 系统中的存储位置?

原文:

I noticed now that linter 'kind of' works.

In ST it seems to show errors and I can navigate through the errors, but it is not noticing #TODO, not sure if that is related to the error I quoted in the first message.

By the way, do you by any chance know where the linter executable is stored on a Linux system?

braver 2017-10-9
6

@michK我真的不太了解 Linux 告诉你。which pyflakes告诉您什么?

原文:

@michK I wouldn't really know enough about Linux to tell you that. What does which pyflakes tell you?

michk 2017-10-9
7

which pyflakes返回 /home/user/anaconda3/bin/pyflakes , 但 which linter 不返回任何值, 这就是为什么我认为绒可执行文件是问题所在, 尽管它似乎 "有点儿" 工作很奇怪。

原文:

which pyflakes returns /home/user/anaconda3/bin/pyflakes, but which linter returns nothing, which is why I think the linter executable is the problem, although it's weird that it seems to 'kind of' work.

braver 2017-10-9
8

嗯, 没有 linter 程序 (无论如何都与此相关), 所以我不希望返回任何东西。

那么, 你现在只是有一个问题与 #TODO 没有点燃?这听起来更像是绒配置的事情。如果你想帮助设置它, 我可以推荐崇高的文本论坛或不和谐的渠道: 很多的 python 开发者, 可以帮助你。https://forum.sublimetext.com/t/sublime-text-discord-server/26063

原文:

Well, there is no linter program (related to this anyway), so I wouldn't expect that to return anything.

So, you're now just having an issue with #TODO not lighting up? That sounds more like a linter configuration thing. If you want help setting it up, I can recommend the Sublime Text forums or the Discord channel: lot's of python devs that can help you out. https://forum.sublimetext.com/t/sublime-text-discord-server/26063

michk 2017-10-9
9

查找绒 excecutable下查看此处, 它说应该存在一个程序 linter

谢谢你的推荐, 会查出来的。

原文:

Have a look here under Finding a linter excecutable, it says there should exist a program linter.

Thank you for the reference, will check it out.

braver 2017-10-9
10

是的, 你有点错过了这部分:

用绒可执行文件名替换绒

原文:

Yeah you kinda missed this part:

replacing linter with the linter executable name

michk 2017-10-9
11

哎呀.

好吧, 看来我的问题更与配置有关。

谢谢你的帮助。

原文:

Oops.

Ok, so it seems my issue is more related to the configuration.

Thanks for the help.

返回
发表文章
michk
文章数
1
评论数
6
注册排名
60803