MetroRobots / ros_glint

Make your ROS code sparkle!
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

AttributeError: 'Package' object has no attribute 'write' #19

Closed Achllle closed 2 months ago

Achllle commented 2 months ago

Running glint_ros on a set of packages, when some changes are suggested and I select y to accept the change, I get an AttributeError.

=====package.xml=============================================
...
  <package format="2">
    <name>system_monitor</name>
    <version>0.0.0</version>
    <description>The system_monitor package</description>

+   <depend>roscpp</depend>
+   <depend>std_msgs</depend>
+   <depend>std_srvs</depend>
+   <build_export_depend>message_runtime</build_export_depend>
    <maintainer email="todo@todo.todo">todo</maintainer>

...
    <buildtool_depend>catkin</buildtool_depend>
-   <build_depend>roscpp</build_depend>
-   <build_depend>std_msgs</build_depend>
-   <build_depend>std_srvs</build_depend>
    <build_export_depend>roscpp</build_export_depend>
    <build_export_depend>std_msgs</build_export_depend>
    <build_export_depend>std_srvs</build_export_depend>
-   <exec_depend>roscpp</exec_depend>
-   <exec_depend>std_msgs</exec_depend>
-   <exec_depend>std_srvs</exec_depend>
    <build_depend>message_generation</build_depend>
    <exec_depend>message_runtime</exec_depend>

    </export>
  </package>

...
Would you like to make this change? [y/N]: y
        Unsure of ordering for #comment
        Unsure of ordering for #comment
        Unsure of ordering for #comment
        Unsure of ordering for #comment
Exception occurred while running check_manifest_dependencies: 'Package' object has no attribute 'write'
Traceback (most recent call last):
  File "/usr/local/bin/glint_ros", line 8, in <module>
    sys.exit(main())
  File "/home/user/.local/lib/python3.8/site-packages/ros_glint/main.py", line 143, in main
    package.write()
AttributeError: 'Package' object has no attribute 'write'

It does indeed seem like there's no write method in the Package class.

DLu commented 2 months ago

Thank you for pointing this out. I honestly don't know how that one got by me. New version up on pip.