-
Notifications
You must be signed in to change notification settings - Fork 170
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
improve error message when package.xml is malformed #598
Comments
I am happy to work on this but I need a repro that I can do on a clean machine. I suspect in this case it should include invalid package.xml and a command line. |
I think you could take any workspace (like with just catkin in it) and modify the package.xml to have |
So here is my plan:
How does it sound? |
…ackage name in the message. This work is needed for [https://github.com/ros-infrastructure/rosdep/issues/598](https://github.com/ros-infrastructure/rosdep/issues/598)
* `parse_package_string()` raises `InvalidPackage` exception with the package name in the message. This work is needed for [https://github.com/ros-infrastructure/rosdep/issues/598](https://github.com/ros-infrastructure/rosdep/issues/598) * Add filename to the InvalidPackage exception coming from `Package.validate()` * `InvalidPackage` has `msg` and`package_path` (#1) `InvalidPackage` exception has `msg`, `package_path` and defines `__str__()` Note that `parse_package_string()` catches `InvalidPackage` exception and sets the filename; it is needed because the functions that called in `_parse_package_string()` raise InvalidPackage exception without filename, e.g. `_get_node()` * Minor code review fixes - Use double quotes for string literals with single quotes inside - Use forward slash instead of backward slash in file path * Pass filename to functions that raise InvalidPackage Remove not used `_get_optional_node_value()` Remove try/except block that was adding filename to InvalidPackage exception * nipick: improve error message
* `parse_package_string()` raises `InvalidPackage` exception with the package name in the message. This work is needed for [https://github.com/ros-infrastructure/rosdep/issues/598](https://github.com/ros-infrastructure/rosdep/issues/598) * Add filename to the InvalidPackage exception coming from `Package.validate()` * `InvalidPackage` has `msg` and`package_path` (#1) `InvalidPackage` exception has `msg`, `package_path` and defines `__str__()` Note that `parse_package_string()` catches `InvalidPackage` exception and sets the filename; it is needed because the functions that called in `_parse_package_string()` raise InvalidPackage exception without filename, e.g. `_get_node()` * Minor code review fixes - Use double quotes for string literals with single quotes inside - Use forward slash instead of backward slash in file path * Pass filename to functions that raise InvalidPackage Remove not used `_get_optional_node_value()` Remove try/except block that was adding filename to InvalidPackage exception * nipick: improve error message
* Enable flake8 for the project as a unit test. The test is copied from [https://github.com/ros-infrastructure/rosdep/blob/d31c5320b95f4e9ff6a0aad56a8531cb138fc079/test/test_flake8.py](https://github.com/ros-infrastructure/rosdep/blob/d31c5320b95f4e9ff6a0aad56a8531cb138fc079/test/test_flake8.py) Code re-formatted, fixed other issues raised by flake8 * Do not run flake8 test on Python 3.2 Add Python 3.6 to Travis CI * keep operator trailing * avoid aligned indentation * avoid aligned indentation * remove unnecessary parenthesis * avoid aligned indentation * remove old comment * conf.py doesn't exist * remove usage of format_map which is not available in Python 2.7 * remove usage of format_map which is not available in Python 2.7 * Include package name in error message (#212) * Include package name in error message * Wrapped package name in quotes for consistency * Add support for file attribution of license tag (#202) * InvalidPackage with package path (#209) * `parse_package_string()` raises `InvalidPackage` exception with the package name in the message. This work is needed for [https://github.com/ros-infrastructure/rosdep/issues/598](https://github.com/ros-infrastructure/rosdep/issues/598) * Add filename to the InvalidPackage exception coming from `Package.validate()` * `InvalidPackage` has `msg` and`package_path` (#1) `InvalidPackage` exception has `msg`, `package_path` and defines `__str__()` Note that `parse_package_string()` catches `InvalidPackage` exception and sets the filename; it is needed because the functions that called in `_parse_package_string()` raise InvalidPackage exception without filename, e.g. `_get_node()` * Minor code review fixes - Use double quotes for string literals with single quotes inside - Use forward slash instead of backward slash in file path * Pass filename to functions that raise InvalidPackage Remove not used `_get_optional_node_value()` Remove try/except block that was adding filename to InvalidPackage exception * nipick: improve error message * Fix flake8 issues (1 empty line instead of 2) for recently updated code
All changes are in, I propose to close the issue. |
Anytime there's an issue with a
package.xml
you get something like reported in #597 (comment).Instead it should avoid the traceback and the message to report it on the rosdep repository. Also, it should include which
package.xml
has the issue.The text was updated successfully, but these errors were encountered: