Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

ImportError: cannot import name 'aqa_pb2' #13

Closed
edunatalec opened this issue Dec 11, 2018 · 8 comments
Closed

ImportError: cannot import name 'aqa_pb2' #13

edunatalec opened this issue Dec 11, 2018 · 8 comments

Comments

@edunatalec
Copy link

edunatalec commented Dec 11, 2018

When I run this code in Jupyter, that error show up for me:
!python -m px.environments.bidaf_server
--port=10000
--squad_data_dir=./data/squad
--bidaf_shared_file=./data/bidaf/shared.json
--bidaf_model_dir=./data/bidaf

The import can't be completed, I guess, because doesn't have the file to import.
In px/proto I can't found it.

I'm using Python 2.

@marcoaleixo
Copy link

Me too.

@TomLaMantia
Copy link

TomLaMantia commented Dec 18, 2018

I seem to be getting this as well. If I comment out from px.proto import aqa_pb2 from active-qa/px/nmt/environment_client.py, then I get a different error: A server address must be provided.

I don't see anything related to aqa_pb2 in the commit history either.

I'm using Python 3 (same issue with Python 2)

@bvnagaraju
Copy link

trying just do re-formulator inferences ..
getting same import error ..maybe something to do with enums
from px.proto import aqa_pb2
ImportError: cannot import name 'aqa_pb2'

@JohannesTK
Copy link

You have most likely missed compiling the gRPC interface for the Environment Server.

chmod +x compile_protos.sh; ./compile_protos.sh

@bvnagaraju
Copy link

thank you. I realized it last night:)

@christianbuck
Copy link

Does this resolve the issue?

You have most likely missed compiling the gRPC interface for the Environment Server.

chmod +x compile_protos.sh; ./compile_protos.sh

@mady143
Copy link

mady143 commented Dec 3, 2019

HI, @JohannesTK ,

Actually i Compiled the environment server but i could't resolve the issue like i am getting the error as
(my_name) manikantha@Manikantha-PC:~/Downloads/active-qa-master$ chmod +x compile_protos.sh; ./compile_protos.sh
WORK_DIR: ./px/
~/Downloads/active-qa-master/px ~/Downloads/active-qa-master
~/Downloads/active-qa-master

(my_name) manikantha@Manikantha-PC:/Downloads/active-qa-master$
(my_name) manikantha@Manikantha-PC:
/Downloads/active-qa-master$ python -m px.environments.bidaf_server --port=10000 --squad_data_dir=data/squad --bidaf_shared_file=data/bidaf/shared.json --bidaf_model_dir=data/bidaf/
/home/manikantha/my_name/local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:458: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/manikantha/my_name/local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:459: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/manikantha/my_name/local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:460: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/manikantha/my_name/local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:461: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/manikantha/my_name/local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:462: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/manikantha/my_name/local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:465: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
/home/manikantha/my_name/local/lib/python3.6/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/manikantha/Downloads/active-qa-master/px/environments/bidaf_server.py", line 38, in
from px.proto import aqa_pb2_grpc
File "/home/manikantha/Downloads/active-qa-master/px/proto/aqa_pb2_grpc.py", line 4, in
import aqa_pb2 as aqa__pb2
ModuleNotFoundError: No module named 'aqa_pb2'

can any one help me in resolving this issue
Note: I am using Python 3.6.9

Thanks And Regards,
Manikantha Sekhar.

Happy Codding..

@mady143
Copy link

mady143 commented Jan 2, 2020

You have most likely missed compiling the gRPC interface for the Environment Server.

chmod +x compile_protos.sh; ./compile_protos.sh

Even though i am getting the same error no module aqa_pb2 error i was unbale to go forword without resolving this issue could any one help me

Thanks & Regards,
Manikantha Sekhar

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants