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

As a user, I want to to publish pixieapps so that I can use them as web dashboard on pixiegateway #26

Open
swapatGithub opened this issue Jul 15, 2018 · 8 comments

Comments

@swapatGithub
Copy link

Expected behavior

I am publishing a simple pixieapp on pixiegateaway and it shows successful notification from jupyter notebook after I submit. It is expected to open that pixieapp from pixiegateaway when I start the server using below command
~/.local/bin/jupyter pixiegateway --port 8080 --ip server-ip-address

Actual behavior

I get below error message when I click on published pixieapp

Unexpected error:
Traceback (most recent call last):
File "/users/user-id/.local/lib/python2.7/site-packages/tornado/web.py", line 1512, in _execute
result = yield result
File "/users/user-id/.local/lib/python2.7/site-packages/tornado/gen.py", line 1055, in run
value = future.result()
File "/users/user-id/.local/lib/python2.7/site-packages/tornado/concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "/users/user-id/.local/lib/python2.7/site-packages/tornado/gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "/users/user-id/.conda/envs/my_env/lib/python2.7/site-packages/pixiegateway/handlers.py", line 161, in get
managed_client = yield self.session.get_managed_client(self, pixieapp_def, True)
File "/users/user-id/.local/lib/python2.7/site-packages/tornado/gen.py", line 1055, in run
value = future.result()
File "/users/user-id/.local/lib/python2.7/site-packages/tornado/concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "/users/user-id/.local/lib/python2.7/site-packages/tornado/gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "/users/user-id/.conda/envs/my_env/lib/python2.7/site-packages/pixiegateway/session.py", line 111, in get_managed_client
raise gen.Return((yield self.get_managed_client_by_run_id(run_id, pixieapp_def, retry)))
File "/users/user-id/.local/lib/python2.7/site-packages/tornado/gen.py", line 1055, in run
value = future.result()
File "/users/user-id/.local/lib/python2.7/site-packages/tornado/concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "/users/user-id/.local/lib/python2.7/site-packages/tornado/gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "/users/user-id/.conda/envs/my_env/lib/python2.7/site-packages/pixiegateway/session.py", line 118, in get_managed_client_by_run_id
managed_client = yield ManagedClientPool.instance().get(pixieapp_def)
File "/users/user-id/.local/lib/python2.7/site-packages/tornado/gen.py", line 1055, in run
value = future.result()
File "/users/user-id/.local/lib/python2.7/site-packages/tornado/concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "/users/user-id/.local/lib/python2.7/site-packages/tornado/gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "/users/user-id/.conda/envs/my_env/lib/python2.7/site-packages/pixiegateway/managedClient.py", line 332, in get
yield client.start()
File "/users/user-id/.local/lib/python2.7/site-packages/tornado/gen.py", line 1055, in run
value = future.result()
File "/users/user-id/.local/lib/python2.7/site-packages/tornado/concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "/users/user-id/.local/lib/python2.7/site-packages/tornado/gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "/users/user-id/.conda/envs/my_env/lib/python2.7/site-packages/pixiegateway/managedClient.py", line 79, in start
on_failure=on_failure
File "/users/user-id/.local/lib/python2.7/site-packages/tornado/gen.py", line 1055, in run
value = future.result()
File "/users/user-id/.local/lib/python2.7/site-packages/tornado/concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "/users/user-id/.local/lib/python2.7/site-packages/tornado/gen.py", line 1069, in run
yielded = self.gen.send(value)
File "/users/user-id/.conda/envs/my_env/lib/python2.7/site-packages/pixiegateway/kernel/local.py", line 50, in start_kernel
raise
TypeError: exceptions must be old-style classes or derived from BaseException, not NoneType

Steps to reproduce the behavior

Following the tutorial in pixiedust documentation, I created HelloWorldPixieAppWithData pixieapp which runs fine in jupyter notebook but doesn't run/open in pixiegateaway.

@DTAIEB
Copy link
Member

DTAIEB commented Jul 18, 2018

@swapatGithub I recently published version 0.6 of PixieGateway which should solve this issue. Can you please install it and verify that your issue is fixed.
Thanks

@swapatGithub
Copy link
Author

@DTAIEB Thank you for the response.
I installed version 0.6 of Pixiegateway and was trying to open the pixiegateway server UI, but it gave me error saying /template/login.html is not available in pixiegateway package. I compared the 0.5 and 0.6 versions and I see that all the html pages in "/pixiegateway/template/" folder in version 0.5 are not there in version 0.6.
Regards,
Swapnil

@DTAIEB
Copy link
Member

DTAIEB commented Jul 19, 2018

@swapatGithub you're right, there were some missing static file in the dist files. I've fixed the problem and published version 0.8 on PyPi. I also tested it with this version and it seems ok now.
Can you please give it another try.
Thanks

@swapatGithub
Copy link
Author

@DTAIEB Thanks, that works now. But I am still facing the original error when I try to open the deployed pixieapp. I am getting the exact same error which I have copied in my first comment.
Regards,
Swapnil Pawar

@DTAIEB
Copy link
Member

DTAIEB commented Jul 21, 2018

@swapatGithub ok, I noticed in the exception stacktrace that you are using Python 2.7. Could you try with Python 3.x? Also, can you post the PixieApp code you're using so I can reproduce?
Thanks

@swapatGithub
Copy link
Author

@DTAIEB It works now with Python 3.4. I created very simple pixie app with two buttons in Python 3.4 and it did open on pixiegateway server. I'll continue to explore more functionalities of pixiedust now.
Thanks a lot for your help, really appreciate it.

@anna-knez
Copy link

anna-knez commented Sep 5, 2018

Hi @DTAIEB ,

Sorry for bothering you.
I am trying to do the same thing: my simple HelloWorldPixieApp published successfully with Pixiedust 1.1.11, Tornado 4.5.3 and Python 3.6. However, when I try to click through and open the said app on the server I get:

Traceback (most recent call last):
File "/opt/conda/lib/python3.6/site-packages/tornado/web.py", line 1592, in _execute
result = yield result
File "/opt/conda/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
value = future.result()
File "/opt/conda/lib/python3.6/site-packages/tornado/gen.py", line 1141, in run
yielded = self.gen.throw(*exc_info)
File "/opt/conda/lib/python3.6/site-packages/pixiegateway/handlers/handlers.py", line 102, in get
managed_client = yield self.session.get_managed_client(self, pixieapp_def, True)
File "/opt/conda/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
value = future.result()
File "/opt/conda/lib/python3.6/site-packages/tornado/gen.py", line 1141, in run
yielded = self.gen.throw(*exc_info)
File "/opt/conda/lib/python3.6/site-packages/pixiegateway/session.py", line 111, in get_managed_client
raise gen.Return((yield self.get_managed_client_by_run_id(run_id, pixieapp_def, retry)))
File "/opt/conda/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
value = future.result()
File "/opt/conda/lib/python3.6/site-packages/tornado/gen.py", line 1141, in run
yielded = self.gen.throw(*exc_info)
File "/opt/conda/lib/python3.6/site-packages/pixiegateway/session.py", line 118, in get_managed_client_by_run_id
managed_client = yield ManagedClientPool.instance().get(pixieapp_def)
File "/opt/conda/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
value = future.result()
File "/opt/conda/lib/python3.6/site-packages/tornado/gen.py", line 326, in wrapper
yielded = next(result)
File "/opt/conda/lib/python3.6/site-packages/pixiegateway/managedClient.py", line 340, in get
clients = list(filter(lambda mc: mc.run_stats["kernel_name"] == kernel_name, self.managed_clients))
File "/opt/conda/lib/python3.6/site-packages/pixiegateway/managedClient.py", line 340, in
clients = list(filter(lambda mc: mc.run_stats["kernel_name"] == kernel_name, self.managed_clients))
KeyError: 'kernel_name'

I've also managed to create this error with python 2.7, after which I moved to 3.6 after reading here that PixieDust may not work properly with Python2.X

Thank you very much.

Anna

@romwhyte
Copy link

Hello @DTAIEB,

I am also trying to do the same thing: my simple HelloWorldPixieApp works perfectly in jupyter and published successfully to the pixiedustgateway, however, any application that uses pd_app will have this error message

Traceback (most recent call last):
File "/opt/conda/lib/python3.6/site-packages/tornado/web.py", line 1592, in _execute
result = yield result
File "/opt/conda/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
value = future.result()
File "/opt/conda/lib/python3.6/site-packages/tornado/gen.py", line 1141, in run
yielded = self.gen.throw(*exc_info)
File "/opt/conda/lib/python3.6/site-packages/pixiegateway/handlers/handlers.py", line 70, in post
managed_client = yield self.session.get_managed_client_by_run_id(run_id)
File "/opt/conda/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
value = future.result()
File "/opt/conda/lib/python3.6/site-packages/tornado/gen.py", line 326, in wrapper
yielded = next(result)
File "/opt/conda/lib/python3.6/site-packages/pixiegateway/session.py", line 127, in get_managed_client_by_run_id
raise Exception("Invalid run_id: {} - {}".format(run_id, pixieapp_def))
Exception: Invalid run_id: 1e80f97c-6cce-455c-beaf-380b87a89a6b - None

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

4 participants