GithubHelp home page GithubHelp logo

Comments (3)

marijnh avatar marijnh commented on August 16, 2024

Attached patch fixes two problems I ran into. If you find more, could you file bugs where you describe exactly what you did and what went wrong?

from tern_for_vim.

sys9kdr avatar sys9kdr commented on August 16, 2024

I closed this issue by mistake, sorry.

On Windows I still have this issue.

  1. Opening a file contains non-ascii char in file name. (e.g. c:\大根.js)
  2. Press in insert mode.
  3. Omni completion doesn't work and vim return error code.

Vim return this code.

Error detected while processing function tern#Complete:
line    2:
Traceback (most recent call last):
Error detected while processing function tern#Complete:
line    2:
  File "<string>", line 1, in <module>
Error detected while processing function tern#Complete:
line    2:
  File "C:\Users\username\.vim\bundle\tern_for_vim/script/tern.py", line 231, in tern_ensureCompletionCached
Error detected while processing function tern#Complete:
line    2:
    {"line": curRow - 1, "ch": curCol})
Error detected while processing function tern#Complete:
line    2:
  File "C:\Users\username\.vim\bundle\tern_for_vim/script/tern.py", line 165, in tern_runCommand
Error detected while processing function tern#Complete:
line    2:
    doc["files"].append(tern_fullBuffer())
Error detected while processing function tern#Complete:
line    2:
  File "C:\Users\username\.vim\bundle\tern_for_vim/script/tern.py", line 123, in tern_fullBuffer
Error detected while processing function tern#Complete:
line    2:
    "name": tern_relativeFile(),
Error detected while processing function tern#Complete:
line    2:
  File "C:\Users\username\.vim\bundle\tern_for_vim/script/tern.py", line 111, in tern_relativeFile
Error detected while processing function tern#Complete:
line    2:
    filename = vim.eval("expand('%:p')").decode('utf-8')
Error detected while processing function tern#Complete:
line    2:
  File "C:\Python27\Lib\encodings\utf_8.py", line 16, in decode
Error detected while processing function tern#Complete:
line    2:
    return codecs.utf_8_decode(input, errors, True)
Error detected while processing function tern#Complete:
line    2:
UnicodeDecodeError: 'utf8' codec can't decode byte 0x91 in position 3: invalid start byte

I can avoid to use non-ascii char file, so I keep this issue closing.

from tern_for_vim.

marijnh avatar marijnh commented on August 16, 2024

The data that is causing the error is coming from vim.eval. Unfortunately, I have no idea what encoding that is supposed to return. I wouldn't be too surprised if it was different from platform to platform.

from tern_for_vim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.