veksha / cuda_codeium

Codeium addon for CudaText text editor
MIT License
5 stars 5 forks source link

crash on Chat using #5

Closed Alexey-T closed 1 year ago

Alexey-T commented 1 year ago
Python 3.8.10
Loaded session: "history session.json", 0ms, 0 file(s)
Startup: 300ms, plugins: 0ms ()
Init: cuda_codeium
Init: cudatext
Traceback (most recent call last):
  File "/home/user/.config/cudatext/py/cuda_codeium/__init__.py", line 380, in Ask
    self.request_GetChatMessage(question)
  File "/home/user/.config/cudatext/py/cuda_codeium/__init__.py", line 393, in request_GetChatMessage
    from . import proto_pb2
  File "/home/user/.config/cudatext/py/cuda_codeium/proto_pb2.py", line 5, in <module>
    from google.protobuf.internal import builder as _builder
ImportError: cannot import name 'builder' from 'google.protobuf.internal' (/usr/lib/python3/dist-packages/google/protobuf/internal/__init__.py)
ERROR: Exception in CudaText for Ask: ImportError: cannot import name 'builder' from 'google.protobuf.internal' (/usr/lib/python3/dist-packages/google/protobuf/internal/__init__.py)

Ubuntu 20.04

Alexey-T commented 1 year ago
user@PC:~$ pip3 uninstall protobuf
Found existing installation: protobuf 3.6.1
Not uninstalling protobuf at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'protobuf'. No files were found to uninstall.
Alexey-T commented 1 year ago

fix is: replace sys.path.append with

        sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
veksha commented 1 year ago

fixed. is it working on your system now?

Alexey-T commented 1 year ago

Yes, ok