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

How to run it on windows 10? #74

Open
qitop opened this issue Dec 12, 2021 · 3 comments
Open

How to run it on windows 10? #74

qitop opened this issue Dec 12, 2021 · 3 comments

Comments

@qitop
Copy link

qitop commented Dec 12, 2021

Hi, I am trying to run this code on windows 10 with pychram2021 but facing linux based dependeny issues in it.
I created virtual environment on pycharm
I tried running main.py -v

Firstly in analyzer.py file
import resoruce
was giving an error. I replaced that with

import psutil

Now I am facing another error. Here's my log

C:\Users\Desktop\WPN\PathBench-master\PathBench-master\venv\Scripts\python.exe C:/Users/Desktop/WPN/PathBench-master/PathBench-master/src/main.py -v
args:Namespace(algorithms=None, analyzer=False, debug='LOW', deterministic=False, dims=3, fill_rate=None, generator=False, generatortype=None, include_all_builtin_maps=False, include_builtin_algorithms=False, include_default_builtin_maps=False, list_algorithms=False, list_maps=False, maps=None, num_maps=None, numpy_random_seed=0, room_size=None, std_random_seed=0, torch_random_seed=0, trainer=False, visualiser=True, visualiser_flags=None)
[2021-12-11 15:39:59] - '.pathbench.json' not found, falling back to default state data
[2021-12-11 15:39:59] - Active torch device: cpu
Known pipe types:
  wglGraphicsPipe
(all display modules loaded.)
:display:windisplay(warning): SetForegroundWindow() failed!
[2021-12-11 15:40:01] - Started: run
:express(warning): Filename uses Windows-style path: C:\Users\Desktop\WPN\PathBench-master\PathBench-master\data\gui\colour_palette.png
:express(warning):   expected Unix-style path: /c/Users/Desktop/WPN/PathBench-master/PathBench-master/data/gui/colour_palette.png
:gobj(error): Texture::read() - couldn't read: C:\Users\Desktop\WPN\PathBench-master\PathBench-master\data\gui\colour_palette.png
:express(warning): Filename uses Windows-style path: C:\Users\Desktop\WPN\PathBench-master\PathBench-master\data\gui\colour_palette.png
:express(warning):   expected Unix-style path: /c/Users/Desktop/WPN/PathBench-master/PathBench-master/data/gui/colour_palette.png
:gobj(error): Unable to find texture "C:\Users\Desktop\WPN\PathBench-master\PathBench-master\data\gui\colour_palette.png" on model-path /c/Users/Desktop/WPN/PathBench-master/PathBench-master/src;/c/Users/Desktop/WPN/PathBench-master/PathBench-master/venv/Lib/site-packages/panda3d/etc/..;/c/Users/Desktop/WPN/PathBench-master/PathBench-master/venv/Lib/site-packages/panda3d/etc/../models
Traceback (most recent call last):
  File "C:/Users/Desktop/WPN/PathBench-master/PathBench-master/src/main.py", line 207, in <module>
    ret = main()
  File "C:/Users/Desktop/WPN/PathBench-master/PathBench-master/src/main.py", line 203, in main
    return configure_and_run(args, configurers)
  File "C:/Users/Desktop/WPN/PathBench-master/PathBench-master/src/main.py", line 160, in configure_and_run
    mr.run()
  File "C:\Users\Desktop\WPN\PathBench-master\PathBench-master\src\simulator\services\debug.py", line 72, in wrapper
    res = func(*args, **kwargs)
  File "C:/Users/Desktop/WPN/PathBench-master/PathBench-master/src/main.py", line 35, in run
    simulator.start()
  File "C:\Users\Desktop\WPN\PathBench-master\PathBench-master\src\simulator\simulator.py", line 57, in start
    return self.__start_with_graphics()
  File "C:\Users\Desktop\WPN\PathBench-master\PathBench-master\src\simulator\simulator.py", line 80, in __start_with_graphics
    self.__gui_view = GuiView(self.__services, None, self.__main_view)
  File "C:\Users\Desktop\WPN\PathBench-master\PathBench-master\src\simulator\views\gui\gui_view.py", line 20, in __init__
    self.__vs = ViewEditor(self._services, self.__mouse1_press_callback)
  File "C:\Users\Desktop\WPN\PathBench-master\PathBench-master\src\simulator\views\gui\view_editor.py", line 628, in __init__
    self.__colour_picker = AdvancedColourPicker(self.__base, self.__window.frame, self.__colour_picker_callback, mouse1_press_callbacks)
  File "C:\Users\Desktop\WPN\PathBench-master\PathBench-master\src\simulator\views\gui\view_editor.py", line 362, in __init__
    self.__colour_picker = ColourPicker(self.__base,
  File "C:\Users\Desktop\WPN\PathBench-master\PathBench-master\src\simulator\views\gui\view_editor.py", line 46, in __init__
    self.__palette_frame = DirectFrame(image=palette_filename, **kwargs)
  File "C:\Users\Desktop\WPN\PathBench-master\PathBench-master\venv\lib\site-packages\direct\gui\DirectFrame.py", line 62, in __init__
    self.initialiseoptions(DirectFrame)
  File "C:\Users\Desktop\WPN\PathBench-master\PathBench-master\venv\lib\site-packages\direct\gui\DirectGuiBase.py", line 253, in initialiseoptions
    func()
  File "C:\Users\Desktop\WPN\PathBench-master\PathBench-master\venv\lib\site-packages\direct\gui\DirectFrame.py", line 210, in setImage
    self.createcomponent(
  File "C:\Users\Desktop\WPN\PathBench-master\PathBench-master\venv\lib\site-packages\direct\gui\DirectGuiBase.py", line 572, in createcomponent
    widget = widgetClass(*widgetArgs, **kw)
  File "C:\Users\Desktop\WPN\PathBench-master\PathBench-master\venv\lib\site-packages\direct\gui\OnscreenImage.py", line 60, in __init__
    self.setImage(image, parent = parent, sort = sort)
  File "C:\Users\Desktop\WPN\PathBench-master\PathBench-master\venv\lib\site-packages\direct\gui\OnscreenImage.py", line 117, in setImage
    tex = loader.loadTexture(image)
  File "C:\Users\Desktop\WPN\PathBench-master\PathBench-master\venv\lib\site-packages\direct\showbase\Loader.py", line 756, in loadTexture
    raise IOError(message)
OSError: Could not load texture: C:\Users\Desktop\WPN\PathBench-master\PathBench-master\data\gui\colour_palette.png

Process finished with exit code 1

Can you help me with that?

@qitop
Copy link
Author

qitop commented Dec 18, 2021

Any response?

@judicaelclair
Copy link
Member

Please note that I am no longer actively participating in this project. @husseinalijaafar and @uncobruce are maintaining it from now on. That being said, I think that to get it working on Windows you would simply need to refactor all the locations where file paths are manipulated assuming a UNIX environment (e.g. using os.path.join instead of strings with forward slashes).

@h2jaafar
Copy link
Contributor

h2jaafar commented Jan 3, 2022

Thanks @judicaelclair .

Yes, you would likely encounter some issues with path seperators. Try the recommendations above, and let us know how it goes.

Most of our dev is done on Linux, hence no windows support atm.

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

3 participants