git-afsantos / bonsai

Simplified interface for syntax trees and program models.
MIT License
16 stars 8 forks source link

AttributeError: 'NoneType' has no attribute 'walk_preorder' #9

Closed git-afsantos closed 6 years ago

git-afsantos commented 6 years ago
  File "/home/andre/ros/safer/local/lib/python2.7/site-packages/bonsai/cpp/clang_parser.py", line 822, in parse
    return self._parse_from_db(file_path)
  File "/home/andre/ros/safer/local/lib/python2.7/site-packages/bonsai/cpp/clang_parser.py", line 847, in _parse_from_db
    self.global_scope._afterpass()
  File "/home/andre/ros/safer/local/lib/python2.7/site-packages/bonsai/model.py", line 518, in _afterpass
    codeobj._afterpass()
  File "/home/andre/ros/safer/local/lib/python2.7/site-packages/bonsai/model.py", line 470, in _afterpass
    codeobj._afterpass()
  File "/home/andre/ros/safer/local/lib/python2.7/site-packages/bonsai/model.py", line 405, in _afterpass
    codeobj._afterpass()
  File "/home/andre/ros/safer/local/lib/python2.7/site-packages/bonsai/model.py", line 314, in _afterpass
    for codeobj in self.walk_preorder():
  File "/home/andre/ros/safer/local/lib/python2.7/site-packages/bonsai/model.py", line 53, in walk_preorder
    for descendant in child.walk_preorder():
  File "/home/andre/ros/safer/local/lib/python2.7/site-packages/bonsai/model.py", line 53, in walk_preorder
    for descendant in child.walk_preorder():
  File "/home/andre/ros/safer/local/lib/python2.7/site-packages/bonsai/model.py", line 53, in walk_preorder
    for descendant in child.walk_preorder():
  File "/home/andre/ros/safer/local/lib/python2.7/site-packages/bonsai/model.py", line 53, in walk_preorder
    for descendant in child.walk_preorder():
  File "/home/andre/ros/safer/local/lib/python2.7/site-packages/bonsai/model.py", line 53, in walk_preorder
    for descendant in child.walk_preorder():
AttributeError: 'NoneType' object has no attribute 'walk_preorder'
i1as-d commented 1 year ago

On haros framework, the following works :

haros analyse

And I can visualize the results, but it doesn't with the -n option for the graphs. So

haros analyse -n

spits the following error, related to bonsai-code :

AttributeError: 'float' object has no attribute 'walk_preorder'

I ran the latest haros branch on a ROS2 workspace. Is there a way to fix this ? It would be very helpful to see the generated node-graph models for ROS2. Great features :crossed_fingers:

git-afsantos commented 1 year ago

Hello!

It's likely that you will run into errors on ROS2 code. This was built for ROS1, and there are a few things that will just break.

I am developing a new version of HAROS for ROS2 from scratch, though, but it might be a little while longer until it is ready for the public.

On Mon, Jul 10, 2023, 17:28 i1as-d @.***> wrote:

On haros framework, the following works :

haros analyse

And I can visualize the results, but it doesn't with the -n option for the graphs. So

haros analyse -n

spits the following error, related to bonsai-code :

AttributeError: 'float' object has no attribute 'walk_preorder'

I ran the latest haros branch on a ROS2 workspace. Is there a way to fix this ? It would be very helpful to see the generated node-graph models for ROS2. Great features 🤞

— Reply to this email directly, view it on GitHub https://github.com/git-afsantos/bonsai/issues/9#issuecomment-1629308030, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHNN2DDPRLP6W6QMNCFMCDXPQUTVANCNFSM4F73CAWA . You are receiving this because you modified the open/close state.Message ID: @.***>