qLab / qLib

A procedural asset library for SideFX Houdini. https://www.facebook.com/qLibHoudini
http://qlab.github.io/qLib
Other
744 stars 116 forks source link

Win10 won't open folder from right click menu in open_dir() #1273

Closed berniebernie closed 1 week ago

berniebernie commented 3 years ago

I posted this bug several versions ago, maybe it's due to my specific setup ? (windows10 + french locale) but the following lines https://github.com/qLab/qLib/blob/971da332037bb2afde2dd66502e9632910028dd8/scripts/python/qlibutils.py#L289-L292

Give out a error like so:

Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "//#.#.#.#/pathtoqlib/scripts/python\qlibmenutools.py", line 346, in open_as_fs_path
    qlibutils.open_dir(dir)
  File "//#.#.#.#/pathtoqlib/scripts/python\qlibutils.py", line 290, in open_dir
    subprocess.call(["start", dir])
  File "C:\PROGRA~1\SIDEEF~1\HOUDIN~1.351\python27\lib\subprocess.py", line 172, in call
    return Popen(*popenargs, **kwargs).wait()
  File "C:\PROGRA~1\SIDEEF~1\HOUDIN~1.351\python27\lib\subprocess.py", line 394, in __init__
    errread, errwrite)
  File "C:\PROGRA~1\SIDEEF~1\HOUDIN~1.351\python27\lib\subprocess.py", line 644, in _execute_child
    startupinfo)
WindowsError: [Error 2] Le fichier spécifié est introuvable

I solved it locally by replacing it with

path = os.path.realpath(dir)
os.startfile(path)

It works on images and folders (ie opens up to the right folder using the windows explorer)

(i'm not familiar with github sorry)

johnnyquest commented 2 months ago

@berniebernie apologies for the long delay on this, could you try it with the latest version, 0.2.257 and let me know if it works now?