question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid path to a file

See original GitHub issue

Warning: I will close the issue without the minimal init.vim and the reproduction instructions.

Problems summary

Invalid path to a file Invalid path This thing could be fixed if i “hardcode” path to directory, i.e.

let s:root_dir = fnamemodify(expand('<sfile>'), ':h:h') " line 87

changed to

let s:root_dir = 'C:/Users/autriz/.vim/plugged/ddc.vim'

in file ddc.vim/autoload/ddc.vim.

Invalid path also breaks ddc-around, ddc-matcher_head, etc. when onEvent is called. Broken ddc-around Broken ddc-matcher_head

Expected

Working

Environment Information

  • ddc.vim version (SHA1): 9600d45

  • denops.vim version (SHA1): a104cbf

  • deno version(deno -V output): 1.24.0

  • OS: Win10

  • neovim/Vim :version output: 8.2.5117

:version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jun 23 2022 04:01:15)
Included patches: 1-5117
Compiled by <https://www.msys2.org/>
Huge version without GUI.  Features included (+) or not (-):
+acl               +channel           +cscope            +ex_extra          -hangul_input      +linebreak         +mouse_dec         -mzscheme          +profile           -sodium            -tcl               +user_commands     +wildmenu
+arabic            +cindent           +cursorbind        +extra_search      +iconv             +lispindent        -mouse_gpm         +netbeans_intg     -python            -sound             +termguicolors     +vartabs           +windows
+autocmd           -clientserver      +cursorshape       -farsi             +insert_expand     +listcmds          -mouse_jsbterm     +num64             +python3/dyn       +spell             +terminal          +vertsplit         +writebackup
+autochdir         +clipboard         +dialog_con        +file_in_path      +ipv6              +localmap          +mouse_netterm     +packages          +quickfix          +startuptime       +terminfo          +vim9script        -X11
-autoservername    +cmdline_compl     +diff              +find_in_path      +job               -lua               +mouse_sgr         +path_extra        +reltime           +statusline        +termresponse      +viminfo           -xfontset
-balloon_eval      +cmdline_hist      +digraphs          +float             +jumplist          +menu              -mouse_sysmouse    +perl/dyn          +rightleft         -sun_workshop      +textobjects       +virtualedit       -xim
+balloon_eval_term +cmdline_info      -dnd               +folding           +keymap            +mksession         +mouse_urxvt       +persistent_undo   +ruby/dyn          +syntax            +textprop          +visual            -xpm
-browse            +comments          -ebcdic            -footer            +lambda            +modify_fname      +mouse_xterm       +popupwin          +scrollbind        +tag_binary        +timers            +visualextra       -xsmp
++builtin_terms    +conceal           +emacs_tags        +fork()            +langmap           +mouse             +multi_byte        +postscript        +signs             -tag_old_static    +title             +vreplace          -xterm_clipboard
+byte_offset       +cryptv            +eval              +gettext           +libcall           -mouseshape        +multi_lang        +printer           +smartindent       -tag_any_white     -toolbar           +wildignore        -xterm_save
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/etc"
 f-b for $VIMRUNTIME: "/usr/share/vim/vim82"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -I/usr/include/ncursesw -march=x86-64 -mtune=generic -O2 -pipe -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L. -pipe -fstack-protector-strong -pipe -Wl,--as-needed -o vim.exe -lm -lncursesw -lrt -liconv -lacl -lintl -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector-strong -L/usr/lib/perl5/core_perl/CORE -lperl -lpthr
ead -ldl -lcrypt

Provide a minimal init.vim/vimrc without plugin managers (Required!)

call plug#begin('~/.vim/plugged')

Plug 'gruvbox-community/gruvbox'
Plug 'rhysd/vim-healthcheck'
Plug 'Shougo/ddc.vim'
Plug 'vim-denops/denops.vim'
Plug 'Shougo/ddc-around'
Plug 'Shougo/ddc-matcher_head'
Plug 'Shougo/ddc-sorter_rank'
Plug 'Shougo/ddc-nvim-lsp'

call plug#end()

call ddc#custom#patch_global('sourceOptions', {
    \ '_': {
    \     'matchers': ['matcher_head'],
    \     'sorters': ['sorter_rank']
    \ },
    \ 'nvim-lsp': {
    \     'mark': 'lsp',
    \     'forceCompletionPattern': '\.\w*|:\w*|->\w*'
    \ },
    \ 'around': {
    \    'mark': 'A'
    \ }
    \})
call ddc#custom#patch_global('sources', [
    \ 'around',
    \ 'nvim-lsp'
    \])
call ddc#custom#patch_global('souceParams', {
    \ 'around': {
    \     'maxSize': 500
    \ },
    \ 'nvim-lsp': {
    \     'kindLabels': {
    \         'Class': 'c'
    \     }
    \ },
    \})

call ddc#enable()

How to reproduce the problem from neovim/Vim startup (Required!)

start denops server start vim

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
autrizcommented, Jul 28, 2022

Off topic, but I have one question: is ddu#util#print_error in file ddc.ts:970 (and 975, 980) a typo? Because it being called throws an exception Unknown function: ddu#util#print_error

0reactions
Shougocommented, Jul 29, 2022

OH, I have fixed it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: invalid path or file error even when the file exists
My code raised "invalid path or file" error even when the file exists. When I check the list of files in the path,...
Read more >
Windows Invalid path error - Microsoft Community
When windows starts a small window opens with the message 'Invalid Path: D:\Top\' What's happening? ... When the file downloads, unzip it.
Read more >
"Invalid path or filename 'access is not possible'" when trying ...
Solution: · Check the folder path that the file is trying to download to. If necessary, rename or delete the contents of the...
Read more >
Invalid Path or File Name/File Does Not Exist
This error usually means the report references an image that the system cannot find in the specified path.
Read more >
Long file name or invalid path - Axway Documentation Portal
Illegal characters in path name can occur if a Mac user uploads a file with a name valid on Mac but invalid on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found