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

Unable to resolve client class:If not in the active function, the number of named parameters cannot be returned #5

Open
dokhyi opened this issue Mar 7, 2023 · 2 comments

Comments

@dokhyi
Copy link

dokhyi commented Mar 7, 2023

Hi there,

I found your work very interesting and I appreciate the efforts in open-sourcing the codes. But I'm having trouble use python from MATLAB itself on my Windows machine. I followed the instructions (Writing your first MATLAB script for Carla using the Python interface), but I keep getting an error message when i Getting to step 3 ( client.set_timeout(2.0);). The client class is successfully created in the workspace, but cannot be used further. Here's the error message I'm seeing:

Error using py.carla.libcarla.Client/set_timeout
If not in the active function, the number of named parameters cannot be returned.

But I can actually run the third demo you provided (Getting sensors data in Simulink), and i have the same problem run the first demo. I've tried searching for a solution online, but haven't been able to find anything that works. Can anyone help me troubleshoot this issue? Thank you.

My Software Version:

  • Matlab version: R2021b
    `
    PythonEnvironment - :

        Version: "3.7"
     Executable: "D:\Anaconda\envs\carla013\python.exe"
        Library: "D:\Anaconda\envs\carla013\python37.dll"
           Home: "D:\Anaconda\envs\carla013"
         Status: NotLoaded
        ExecutionMode: InProcess`
    
  • Carla version: 0.9.13

@sukanya-aa
Copy link

Hi @dokhyi, I'm facing a similar problem, but I cannot create a client itself, in the first place. Did you happen to find a workaround? Creating a client works fine for me when I'm running normal python scripts in my conda environment, but unable to do so in matlab.

MATLAB System block '[Carla/MATLAB System](matlab:open_and_hilite_hyperlink ('Carla/MATLAB System','error'))' error occurred when invoking 'setupImpl' method of 'CarlaEnvironment'. Caused by: Unable to resolve the name py.carla.Client.

  • Python version: 3.7
  • Carla version: 0.9.8
  • Matlab version: R2021b

Thanks, in advance!

@dokhyi
Copy link
Author

dokhyi commented Jun 9, 2023

Hi @dokhyi, I'm facing a similar problem, but I cannot create a client itself, in the first place. Did you happen to find a workaround? Creating a client works fine for me when I'm running normal python scripts in my conda environment, but unable to do so in matlab.

MATLAB System block '[Carla/MATLAB System](matlab:open_and_hilite_hyperlink ('Carla/MATLAB System','error'))' error occurred when invoking 'setupImpl' method of 'CarlaEnvironment'. Caused by: Unable to resolve the name py.carla.Client.

  • Python version: 3.7
  • Carla version: 0.9.8
  • Matlab version: R2021b

Thanks, in advance!

At that time, I also encountered a similar problem. As far as I know, this was caused by the Matlab software version and may involve some lower-level issues. However, I did not troubleshoot the specific reason. On my Windows 10 20H2 computer, Carla version 0.9.13, the Matlab versions that can run this project normally are 2019a to 2020b. Although Carla actors can be created normally, Matlab generally crashes when destroying or stopping the simulation. The cause of this problem is also unknown. I hope this can be helpful to you.

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

No branches or pull requests

2 participants