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

flask error #144

Open
rvipin17 opened this issue Oct 11, 2018 · 5 comments
Open

flask error #144

rvipin17 opened this issue Oct 11, 2018 · 5 comments

Comments

@rvipin17
Copy link

rvipin17 commented Oct 11, 2018

if I do roslaunch rostful rostful.launch, getting following error:

File "/home/addverb/.environments/mir/local/lib/python2.7/site-packages/flask/__init__.py", line 21, in <module> from .app import Flask, Request, Response File "/home/addverb/.environments/mir/local/lib/python2.7/site-packages/flask/app.py", line 25, in <module> from . import cli, json File "/home/addverb/.environments/mir/local/lib/python2.7/site-packages/flask/cli.py", line 39, in <module> class NoAppException(click.UsageError): AttributeError: 'module' object has no attribute 'UsageError' [rostful-2] process has died [pid 9754, exit code 1, cmd /home/addverb/catkin_mir_ws/src/rostful/scripts/rostful -h 127.0.0.1 -p 8080 -s flask -c /home/addverb/catkin_mir_ws/src/rostful/instance/rostful.cfg -l /home/addverb/catkin_mir_ws/src/rostful/instance/rostful.log ~connections_list:=/connection_cache/list ~connections_diff:=/connection_cache/diff __name:=rostful __log:=/home/addverb/.ros/log/9dec2b6a-cd19-11e8-996d-dca26629e16b/rostful-2.log]. log file: /home/addverb/.ros/log/9dec2b6a-cd19-11e8-996d-dca26629e16b/rostful-2*.log
Also, if we create a virtual environment and run python -m rostful flask

I am getting the following error message:

Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 163, in _run_module_as_main mod_name, _Error) File "/usr/lib/python2.7/runpy.py", line 111, in _get_module_details __import__(mod_name) # Do not catch exceptions initializing package File "/home/addverb/catkin_mir_ws/devel/lib/python2.7/dist-packages/rostful/__init__.py", line 35, in <module> exec(__fh.read()) File "<string>", line 11, in <module> File "/home/addverb/catkin_mir_ws/src/rostful/rostful/flaskapp.py", line 11, in <module> from .context import register_teardown File "/home/addverb/catkin_mir_ws/src/rostful/rostful/context.py", line 2, in <module> from flask import current_app, g File "/home/addverb/.environments/rostful/local/lib/python2.7/site-packages/flask/__init__.py", line 21, in <module> from .app import Flask, Request, Response File "/home/addverb/.environments/rostful/local/lib/python2.7/site-packages/flask/app.py", line 25, in <module> from . import cli, json File "/home/addverb/.environments/rostful/local/lib/python2.7/site-packages/flask/cli.py", line 39, in <module> class NoAppException(click.UsageError): AttributeError: 'module' object has no attribute 'UsageError'

@asmodehn
Copy link
Member

asmodehn commented Oct 11, 2018 via email

@rvipin17
Copy link
Author

I was able to solve this issue by installing all the deps. Thanks

@rvipin17
Copy link
Author

Rostful install:

Navigate to your workspace,
$ cd ~/catkin_ws/src
$ git clone -b gopher-devel --recursive https://github.com/pyros-dev/rostful.git
$ cd rostful
$ cd deps
$ git clone --recursive https://github.com/pyros-dev/pyros-utils.git
$ cd pyros-utils
$ pip install .
$ cd ..
$ git clone --recursive https://github.com/pyros-dev/pyros.git
$ cd pyros
$ pip install .
$ cd ../..
$ pip install .
$ pip install -r requirements.txt
$ cd ../..
$ catkin_make
$ source devel/setup.bash
$ roslaunch rostful rostful.launch

The above steps will solve all dependencies with rostful. Browse to localhost:8080, you’ll be able to see your rostful localhost running.

Correct me if I am wrong

@asmodehn
Copy link
Member

asmodehn commented Oct 11, 2018 via email

@asmodehn
Copy link
Member

Hi,
In case it might help, I have updated a rostful usecase with turtlesim : asmodehn/rostful-examples#6
Let me know if you find it useful.
Thanks.

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

2 participants