分享

Anaconda.anaconda_lib.workers.local_worker.LocalWorker object at 0x0000027B7733DEB8

 icecity1306 2018-03-17
初学python 用sublimetxt3,安装Anaconda插件,但是打开sublimetxt时出错,弹框报错如下
 

查询bing了解到 https://github.com/DamnWidget/anaconda/issues/527

please find below the solution if you are using python34(3.4) or above.
check your python version: goto command prompt and type "python" hit enter and the first line you get is your python version.

  1. goto path "C:\Users\user-name\AppData\Roaming\Sublime Text 3\Packages\Anaconda\anaconda_lib\linting\pyflakes"

  2. Open file named checker.py

  3. search for word LOOP_TYPES in the file(probably in first 80 lines) which is looks like as below if its latest version of anaconda.

    if PY34:
    LOOP_TYPES = (ast.While, ast.For)
    else:
    LOOP_TYPES = (ast.While, ast.For, ast.AsyncFor)

  4. replace above 4 lines with the below shown 4 lines.

    if PY2 or PY32 or PY33:
    LOOP_TYPES = (ast.While, ast.For, ast.AsyncFor)
    else:
    LOOP_TYPES = (ast.While, ast.For)

  5. restart your sublime.

采用上述做法处理后,不再弹出错误。

即打开C:\Users\user_name\AppData\Roaming\Sublime Text 3\Packages\Anaconda\anaconda_lib\linting\pyflakes下面的checker.py文件

将59行处的脚本进行修改
if PY34:
    LOOP_TYPES = (ast.While, ast.For)
else:
    LOOP_TYPES = (ast.While, ast.For, ast.AsyncFor)

改为
if PY34:
    LOOP_TYPES = (ast.While, ast.For, ast.AsyncFor)
else:
    LOOP_TYPES = (ast.While, ast.For)

重启sublime txt 问题解决

具体原因 后续继续观察学习 有了解的同学 请不吝赐教 十分感谢


  

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多