Search code examples
pythonserverpython-importros

Getting ImportError: cannot import name SRV in ROS


I have a ROS server MY_Warning and I have the file node/srv/MY_Warning.srv which contains:

typ1 var1
typ2 var2                                                                                                                                                                                                                                                                  
---                                                                                                                                                                                                                                                                             
typ3 var3 

in node/src/subdir/main.py (which contains the server) I have from node.srv import MY_Warning, MY_WarningResponse but I'm getting:

    from node.srv import MY_Warning, MY_WarningResponse
ImportError: cannot import name EOR_Warning

while rossrv show MY_Warning shows me the correct/expected thing:

$ rossrv show MY_Warning
[node/MY_Warning]:
typ1 var1
typ2 var2
---
typ3 var3

What am I missing or doing wrong here? I don't get it...


Solution

  • Am i missing something? The missing error for import and the import statements do not match. The module in the error message is not the one imported