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

[sound_play] local variable 'filesound' referenced before assignment #186

Closed
708yamaguchi opened this issue May 25, 2022 · 0 comments · Fixed by #187
Closed

[sound_play] local variable 'filesound' referenced before assignment #186

708yamaguchi opened this issue May 25, 2022 · 0 comments · Fixed by #187

Comments

@708yamaguchi
Copy link
Contributor

708yamaguchi commented May 25, 2022

When I use sound_play with this launch file,

  <node pkg="sound_play" type="soundplay_node.py" name="sound_play_jp"
        if="$(arg launch_sound_play)" respawn="$(arg sound_play_respawn)"
        machine="$(arg sound_play_machine)">
    <remap from="robotsound" to="robotsound_jp"/>
    <remap from="sound_play" to="robotsound_jp"/>
    <env name="PATH" value="$(find voice_text)/bin:$(env PATH)" />
  </node>

I got the following error.

[ERROR] [1653451319.526417] [/sound_play_jp:rosout]: Exception in actionlib callback: local variable 'filesound' referenced before assignment
[INFO] [1653451319.527568] [/sound_play_jp:rosout]: Traceback (most recent call last):
  File "/home/fetch/ros/melodic/src/ros-drivers/audio_common/sound_play/scripts/soundplay_node.py", line 291, in execute_cb
    sound = self.select_sound(data)
  File "/home/fetch/ros/melodic/src/ros-drivers/audio_common/sound_play/scripts/soundplay_node.py", line 109, in select_sound
    sound = filesound
UnboundLocalError: local variable 'filesound' referenced before assignment

I am still not sure why this is happening, but I'll investigate and make a PR as soon as possible.

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

Successfully merging a pull request may close this issue.

1 participant