Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start Subscriber/View #249

Closed
aleonnet opened this issue May 12, 2019 · 0 comments
Closed

Start Subscriber/View #249

aleonnet opened this issue May 12, 2019 · 0 comments

Comments

@aleonnet
Copy link

Hi,
Everything is set and EnergyDisaggregationDemo_Client is up and running, but cannot get rid of the following error (also tried to declare subscriber as global):

Would you help me pls?

Creating subscription "sub1" to topic "pred" ...
Subscription "sub1" existed.


UnboundLocalError Traceback (most recent call last)
in
6 subscription_name=SUB_NAME,
7 app_id_name_map=app_id_name_map,
----> 8 target_device=DEVICE_ID)
9 tt.async_pull_msg()

in init(self, project_id, ground_truth, topic_name, subscription_name, app_id_name_map, target_device)
22 # create subscription
23 self._subscriber, self._subscription_path = (
---> 24 self.create_subscription(project_id, topic_name, subscription_name))
25 self._subscriber.subscribe(self._subscription_path,
26 callback=self._msg_callback)

in create_subscription(self, project_id, topic_name, subscription_name)
52 except Exception as e:
53 print('Subscription "{}" existed.'.format(subscription_name))
---> 54 return subscriber, subscription_path
55
56 def async_pull_msg(self):

UnboundLocalError: local variable 'subscriber' referenced before assignment

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

No branches or pull requests

1 participant