You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error you're encountering is due to a version mismatch between the protobuf crate and the onnx-protobuf crate. Specifically:
Your project is using protobuf version 3.5.1
The onnx-protobuf crate (version 0.2.3) was compiled against protobuf version 3.4.0
This mismatch causes the error:
cannot find value `VERSION_3_4_0` in crate `protobuf`
--> .cargo/registry/src/index.crates.io-6f17d22bba15001f/onnx-protobuf-0.2.3/src/proto/onnx.rs:27:47
|
27 | const _PROTOBUF_VERSION_CHECK: () = protobuf::VERSION_3_4_0;
| ^^^^^^^^^^^^^ help: a constant with a similar name exists: `VERSION_3_5_1`
|
::: target/debug/build/protobuf-9067af482d19c48e/out/version.rs:7:1
|
7 | pub const VERSION_3_5_1: () = ();
| --------------------------- similarly named constant `VERSION_3_5_1` defined here
Resolution Steps
Locate the onnx.rs file:
Path: .cargo/registry/src/index.crates.io-6f17d22bba15001f/onnx-protobuf-0.2.3/src/proto/onnx.rs
This is a temporary fix. The change will be overwritten when you update your dependencies.
A more permanent solution would involve updating onnx-protobuf to a version compatible with protobuf 3.5.1, or pinning protobuf to version 3.4.0 in your Cargo.toml.
The text was updated successfully, but these errors were encountered:
The error you're encountering is due to a version mismatch between the
protobuf
crate and theonnx-protobuf
crate. Specifically:protobuf
version 3.5.1onnx-protobuf
crate (version 0.2.3) was compiled againstprotobuf
version 3.4.0This mismatch causes the error:
Resolution Steps
Locate the
onnx.rs
file:Path:
.cargo/registry/src/index.crates.io-6f17d22bba15001f/onnx-protobuf-0.2.3/src/proto/onnx.rs
Open
onnx.rs
in a text editor.Find this line:
Change it to:
Save the file.
Clean and rebuild your project:
Important Notes
onnx-protobuf
to a version compatible withprotobuf
3.5.1, or pinningprotobuf
to version 3.4.0 in yourCargo.toml
.The text was updated successfully, but these errors were encountered: