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

texture loading is failing on Windows environment #262

Open
etnifsilva opened this issue Jan 15, 2022 · 3 comments
Open

texture loading is failing on Windows environment #262

etnifsilva opened this issue Jan 15, 2022 · 3 comments

Comments

@etnifsilva
Copy link

etnifsilva commented Jan 15, 2022

I tried to run the command that is on docs below:
./manual_control.py --env-name Duckietown-udem1-v0

but a error was aways been arrising:

Traceback (most recent call last):
  File "C:\dev\pos\duckietown\gym-duckietown\manual_control.py", line 35, in <module>
    env = DuckietownEnv(
  File "C:\dev\pos\duckietown\gym-duckietown\src\gym_duckietown\envs\duckietown_env.py", line 16, in __init__
    Simulator.__init__(self, **kwargs)
  File "C:\dev\pos\duckietown\gym-duckietown\src\gym_duckietown\simulator.py", line 381, in __init__
    self.reset()
  File "C:\dev\pos\duckietown\gym-duckietown\src\gym_duckietown\simulator.py", line 638, in reset
    fn = get_texture_file(f"tiles-processed/{self.style}/{kind}/texture")[0]
  File "C:\dev\pos\duckietown\gym-duckietown\venv\lib\site-packages\duckietown_world\world_duckietown\map_loading.py", line 306, in get_texture_file
    raise ZKeyError(msg, tried=tried)
zuper_commons.types.exceptions.ZKeyError: Could not find any texture for tiles-processed/photos/floor/texture
tried:
[tiles-processed/photos/floor/texture.jpg, tiles-processed/photos/floor/texture.png, 
 tiles-processed/photos/floor/texture.tga, tiles-processed/photos/floor/texture.bmp, 
 tiles-processed/photos/floor/texture_1.jpg, 
 tiles-processed/photos/floor/texture_1.png, 
 tiles-processed/photos/floor/texture_1.tga, 
 tiles-processed/photos/floor/texture_1.bmp, 
 tiles-processed/photos/floor/texture_2.jpg, 
 tiles-processed/photos/floor/texture_2.png, 
 tiles-processed/photos/floor/texture_2.tga, 
 tiles-processed/photos/floor/texture_2.bmp, 
 tiles-processed/photos/floor/texture_3.jpg, 
 tiles-processed/photos/floor/texture_3.png, 
 tiles-processed/photos/floor/texture_3.tga, 
 tiles-processed/photos/floor/texture_3.bmp, 
 tiles-processed/photos/floor/texture_4.jpg, 
 tiles-processed/photos/floor/texture_4.png, 
 tiles-processed/photos/floor/texture_4.tga, tiles-processed/photos/floor/texture_4.bmp]

Process finished with exit code 1

I debbuged the code and saw this line of code:
fn = get_texture_file(f"tiles-processed/{self.style}/{kind}/texture")[0]

fn = get_texture_file(f"tiles-processed/{self.style}/{kind}/texture")[0]

this shoud work well on linux machines, but in a Windows machine it's rising an error, like showed before.
I replaced the line with error to this line of code:
fn = get_texture_file(os.path.join("tiles-processed", self.style, kind, "texture"))[0]

and the error was gone.

this is the commit from my fork:

etnifsilva/gym-duckietown@50ce134

@uchansansan
Copy link

same problem(

@Snoup97
Copy link

Snoup97 commented Jun 25, 2022

thx, had the same issue. the following line solved it for me.
fn = get_texture_file(os.path.join("tiles-processed", self.style, kind, "texture"))[0]

@GoldExplosion
Copy link

Thanks, had the same issue and solved it

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

4 participants