Will Mulcahey
Will Mulcahey

Reputation: 99

protoc "tried to write file twice"

I'm was to follow this https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10 . I realized part way through that I was running into problems because not all of my files in the protos folder were converted to python files? So i tried to do each file separately again.

this is what i put into command prompt. it's telling me "tried to write file twice". and in the folder there is still no center_net_pb2.py file.

(tensorflow1) C:\tensorflow1\models\research>protoc object_detection/protos/center_net.proto --python_out=. .\object_detection\protos\center_net.proto
object_detection/protos/center_net_pb2.py: Tried to write the same file twice.

I'm using protobuf version 3.12.3

Upvotes: 2

Views: 6014

Answers (1)

Arthur Tacca
Arthur Tacca

Reputation: 9978

You have included the input file name twice:

protoc object_detection/protos/center_net.proto --python_out=. .\object_detection\protos\center_net.proto

Just put it in once:

protoc object_detection/protos/center_net.proto --python_out=.

Either backslashes or forward slashes work on Windows, so you can use either.

Upvotes: 2

Related Questions