fangfufu / Linux-Fake-Background-Webcam

Faking your webcam background under GNU/Linux, now supports background blurring, animated background, colour map effect, hologram effect and on-demand processing.
GNU General Public License v3.0
1.61k stars 161 forks source link

"Descriptors cannot not be created directly" #179

Closed MatthewABrantley closed 2 years ago

MatthewABrantley commented 2 years ago

I ran into this issue when installing requirements.txt into a python env. https://github.com/protocolbuffers/protobuf/issues/10051

I resolved it by adding:

protobuf==3.20.1

to requirements.txt, I have no idea if this is the correct fix, so not sending this as a PR.

fangfufu commented 2 years ago

Does a newer version of protobuf work? Or does it have to be 3.20.1?

MatthewABrantley commented 2 years ago

No it doesn't seem like it. I changed it to 4.21.1 and got this error:

TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
fangfufu commented 2 years ago

Hmm interesting. But you are pinning it to 3.20.1. I will investigate further over the weekend.

MatthewABrantley commented 2 years ago

I am pinning 3.20.1 because of the thread I linked, but I lack the understanding of why that worked or if there's a better solution.

fangfufu commented 2 years ago

Thanks, fixed via https://github.com/fangfufu/Linux-Fake-Background-Webcam/commit/9cc3657558d9e18fe2a9716808dee5eaee297bf5