Skip to content

Error when getting Eventhub from app client #35

@zabzal

Description

@zabzal

I am running the following in Jupyter notebook - Python 3.5. Based on the example here: https://predixpy.run.aws-usw02-pr.ice.predix.io/services/index.html#id13

import predix.app

app = predix.app.Manifest()
eh = app.get_eventhub()

Here is the Traceback I get:

WARNING:root:Writing manifest manifest.yml unencrypted.
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-0716f09abb5f> in <module>()
      2 
      3 app = predix.app.Manifest()
----> 4 eh = app.get_eventhub()

/usr/local/lib/python3.5/dist-packages/predix/app.py in get_eventhub(self, publish_config, subscribe_config)
    250 
    251     def get_eventhub(self, publish_config=None, subscribe_config=None):
--> 252         import predix.data.eventhub.client
    253         eventhub = predix.data.eventhub.client.Eventhub(subscribe_config=subscribe_config,
    254                                                         publish_config=publish_config)

/usr/local/lib/python3.5/dist-packages/predix/data/eventhub/client.py in <module>()
      9 import predix.config
     10 import predix.service
---> 11 from predix.data.eventhub import Health_pb2_grpc
     12 from predix.data.eventhub import Health_pb2
     13 from predix.data.eventhub.publisher import PublisherConfig, Publisher

/usr/local/lib/python3.5/dist-packages/predix/data/eventhub/Health_pb2_grpc.py in <module>()
      2 import grpc
      3 
----> 4 import Health_pb2 as Health__pb2
      5 
      6 

ImportError: No module named 'Health_pb2'

Seems like an import issue in the Health_pb2_grpc.py file. I confirmed that both these files exist in the module I downloaded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions