infercode icon indicating copy to clipboard operation
infercode copied to clipboard

FileNotFoundError

Open Litchiflowers opened this issue 2 years ago • 12 comments

FileNotFoundError: [WinError 2] 系统找不到指定的文件。: 'C:\Users\Lenovo\.tree-sitter\tree-sitter-parsers-Windows' Hello, How to solve this problem?

Litchiflowers avatar Sep 13 '21 08:09 Litchiflowers

Hi, please make sure you are using Python 3.8 on Windows machine. Python 3.9 currently has trouble getting the right version of Tensorflow installed. After successful installation of infercode, please ensure that you have removed the folder %userprofile%\.tree-sitter before running the test script.

yijunyu avatar Sep 15 '21 19:09 yijunyu

Thank you, I can run the program successfully

Litchiflowers avatar Sep 16 '21 00:09 Litchiflowers

Excuse me, I have one more question, how do I encode large quantities of code?

Litchiflowers avatar Sep 16 '21 01:09 Litchiflowers

I think it is a matter of applying infercode to a number of files multiple times, if your use case the code are as large number of files.

yijunyu avatar Oct 27 '21 14:10 yijunyu

Thank you, I can run the program successfully

Hello, how did you solve this problem? I met the same problem on Linux.

tjuTangSong avatar Nov 09 '21 02:11 tjuTangSong

Thank you, I can run the program successfully

Hello, how did you solve this problem? I met the same problem on Linux.

Hi, are you importing the tree-sitter-parsers package? You can delete the $HOME/.tree-sitter folder, uninstall/reinstall the tree-sitter-parsers package, then rerun the script, see if it gets the problem solved. In the new package, we decide to call the folder ".tree-sitter/bin" so that if you get the command line tree-sitter, it saves time to run it without generating the parsers again.

yijunyu avatar Nov 09 '21 10:11 yijunyu

Hello, i try to run infercode model in google colabe using python 3.8, but i get this error : FileNotFoundError: [Errno 2] No such file or directory: '/root/.tree-sitter/tree-sitter-parsers-Linux, How to solve this problem ?

ElchaabiMohamed avatar May 30 '22 08:05 ElchaabiMohamed

We haven't tested this on Google Collab usage. I guess you need to let the tool install the shared libraries there. If you have command line access, please run pip install tree-sitter-parsers first.

yijunyu avatar May 30 '22 14:05 yijunyu

Looks like you can get it work. Just see if you can get a new version of Visual C++ installed on your computer first.

yijunyu avatar May 31 '22 06:05 yijunyu

Thank you for your answers i can run it successfully. Now i want to fine-tune Infercode model for a downstream task. May I know whether it is the right way to go? If so, would you mind sharing some ideas/insights about how the architecture of the new model looks like?

ElchaabiMohamed avatar Jun 07 '22 09:06 ElchaabiMohamed

FileNotFoundError: [WinError 2] 系统找不到指定的文件。: 'C:\Users\Lenovo.tree-sitter\tree-sitter-parsers-Windows' Hello, How to solve this problem?

Hello, may I ask how you solved this problem? I'm still not sure how to solve this problem. Could you please explain it to me

Misfiti avatar May 21 '23 03:05 Misfiti

I'm still encountering the error 'FileNotFoundError: [Errno 2] No such file or directory: '/root/.tree-sitter/tree-sitter-parsers-Linux' even after following the author's method of deleting '/root/.tree-sitter/' and reinstalling tree-sitter-parsers. Changing the Python version to 3.8 didn't resolve the issue either. My system is Ubuntu.

Swag-Wang avatar May 09 '24 06:05 Swag-Wang