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

[bug] ImportError: cannot import name 'OrderedDict' when debugging ROS2 in Jetson Container #620

Closed
2 of 4 tasks
polyhobbyist opened this issue Dec 3, 2021 · 0 comments · Fixed by #655
Closed
2 of 4 tasks
Labels
bug Something isn't working

Comments

@polyhobbyist
Copy link

(Please add appropriate labels)

  • Windows: (Version)
  • Linux: (Dist/Version)
  • ROS 1: Dist
  • ROS 2: Foxy

<Version of the plugin> 0.7.0

Repro steps

Create a dockerfile which derives from dustynv/ros:foxy-slam-l4t-r32.5.0, with a docker-compose which instantiates it like:

version: '3.4'

services:
  mulews:
    image: ws
    network_mode: "host"
    volumes:
      - ~/ws:/ws
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
      - /dev/i2c-1:/dev/i2c-1
      - /dev/bus/usb:/dev/bus/usb
      - /dev/ttyTHS1:/dev/ttyTHS1
    build:
      context: .
      dockerfile: ./Dockerfile
    command: /bin/sh -c "while sleep 1000; do :; done"

expected behavior

Attempt to debug a ROS2 launch file.

Traceback (most recent call last):
  File "/root/.vscode-server/extensions/ms-iot.vscode-ros-0.6.9/assets/scripts/ros2_launch_dumper.py", line 16, in <module>
    from typing import OrderedDict
ImportError: cannot import name 'OrderedDict'

the nvidia containers have an older version of python, which isn't typical:

python --version
Python 3.6.9

Therefore OrderedDict is not in the typing module. It is in the collections module.

To support Jetson container deployments, suggest using a switch to support both?

@polyhobbyist polyhobbyist added the bug Something isn't working label Dec 3, 2021
ooeygui added a commit to ooeygui/vscode-ros that referenced this issue Jan 21, 2022
@ooeygui ooeygui linked a pull request Jan 22, 2022 that will close this issue
ooeygui added a commit that referenced this issue Jan 22, 2022
* Implmenet script filtering
#474

* Python OrderedDict to Dict
#620
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant