Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

downloaded caffe.proto cannot be read, saying FileNotFoundError, win10, python3 #8

Open
asa008 opened this issue Apr 12, 2019 · 6 comments

Comments

@asa008
Copy link

asa008 commented Apr 12, 2019

Traceback (most recent call last):
File "caffe2PytorchTry001.py", line 7, in
caffe_proto = 'https://raw.githubuserco
File "F:\Projects\VesselSupportClassify2
self.net_param = initialize(caffe_proto
File "F:\Projects\VesselSupportClassify2
subprocess.check_call(['protoc', '--pro
File "C:\Users\q\AppData\Local\Program
retcode = call(*popenargs, **kwargs)
File "C:\Users\q\AppData\Local\Program
with Popen(*popenargs, **kwargs) as p:
File "C:\Users\q\AppData\Local\Program
restore_signals, start_new_session)
File "C:\Users\q\AppData\Local\Program
startupinfo)
FileNotFoundError: [WinError 2] system cannot find out this file
while the file do exists in temp file, but cannot be read

not work on win10, python 3

can you help me to solved this problem?

@vadimkantorov
Copy link
Owner

The initialize method has codegen_dir argument that could help you solve the issue. If you're using the CLI interface, feel free to change this line: https://github.com/vadimkantorov/caffemodel2pytorch/blob/master/caffemodel2pytorch.py#L386 and provide a codegen dir.

@YeRen123455
Copy link

@asa008 Do you solve the problem?

@vadimkantorov
Copy link
Owner

Maybe it's some file path issue. Please print out the arguments before the protoc call, this will help you to debug the problem

@honestabelink
Copy link

For me, pip install protobuf did not add protoc to my path.

@asa008, @YeRen123455 Verify your system can find protoc, by calling it in your command window.

protoc --help

If it's not found, then append your PATH variable, you can run this for ease of testing

SET "PATH=%PATH%;path-to-protoc.exe"

protoc if running conda is found as a Hard Link in 2 locations, but I'd recommend the one in your active ENV.

%userprofile%\Anaconda2\envs\ENV_NAME\Lib\site-packages\torch\bin

So in theory, run this first and you should be good.

Update {ENV_NAME} to your conda env
SET "PATH=%PATH%;%userprofile%\Anaconda2\envs\{ENV_NAME}\Lib\site-packages\torch\bin"

@Adolf-K
Copy link

Adolf-K commented Oct 13, 2021

Maybe it's some file path issue. Please print out the arguments before the protoc call, this will help you to debug the problem

Although I added my local path in line 386, I still prompted that the file could not be found and printed local_ caffe_ Proto, it's right. What should I do,thanks
this is my code:
self.net_param = initialize(caffe_proto, codegen_dir='E:\HRFAE-master').NetParameter()

@vadimkantorov
Copy link
Owner

Sorry, I'm not working on this project anymore. Your best bet is adding print commands and debugging it yourself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants