Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot import name ProtocolBuffer

I am trying to debug app_engine project in visual studio 2015 . So far I have these lines:

I installed with pip: endpoints, protopc, appengine and google-api-python-client libs

import endpoints
from protorpc import message_types
from protorpc import messages
from protorpc import remote

enter image description here

Traceback (most recent call last):
  File "d:\users\someuser\documents\visual studio 2015\Projects\froomPy\froomPy\main.py", line 22, in <module>
    from protorpc import remote
  File "D:\Python27\lib\site-packages\protorpc\remote.py", line 117, in <module>
    from . import protobuf
  File "D:\Python27\lib\site-packages\protorpc\protobuf.py", line 41, in <module>
    from .google_imports import ProtocolBuffer
ImportError: cannot import name ProtocolBuffer

How can I handle this error cannot import name ProtocolBuffer or pip google_imports

like image 301
asdf_enel_hak Avatar asked Jun 15 '26 13:06

asdf_enel_hak


1 Answers

I don't know why you are trying to run/debug this file, but I had the same problem when running:

python Hello_Endpoints/helloworld_api.py 

...until I realized that I just had to run the .yaml function:

dev_appserver.py Hello_Endpoints/app.yaml 

to start the server, and then go to http://localhost:8080/ to see the app running

like image 187
PJ127 Avatar answered Jun 17 '26 02:06

PJ127