Skip to content
This repository has been archived by the owner on Aug 13, 2020. It is now read-only.

Error running script on windows, path delimiter issue #92

Open
remitassing opened this issue Jan 25, 2018 · 1 comment
Open

Error running script on windows, path delimiter issue #92

remitassing opened this issue Jan 25, 2018 · 1 comment

Comments

@remitassing
Copy link

Running the ui_in_gui.calvin example failed due to some path delimiter error

$ csruntime --host localhost ui_in_gui.calvin
Traceback (most recent call last):
  File "C:\Users\eremtas\Documents\Projects\Calvin\venv\Scripts\csruntime-script.py", line 11, in <module>
    load_entry_point('calvin', 'console_scripts', 'csruntime')()
  File "c:\users\eremtas\documents\projects\calvin\calvin-base\calvin\Tools\csruntime.py", line 368, in main
    set_config_from_args(args)
  File "c:\users\eremtas\documents\projects\calvin\calvin-base\calvin\Tools\csruntime.py", line 211, in set_config_from_args
    _conf = calvinconfig.get()
  File "c:\users\eremtas\documents\projects\calvin\calvin-base\calvin\utilities\calvinconfig.py", line 345, in get
    _config = CalvinConfig()
  File "c:\users\eremtas\documents\projects\calvin\calvin-base\calvin\utilities\calvinconfig.py", line 76, in __init__
    conf_paths = self.config_paths()
  File "c:\users\eremtas\documents\projects\calvin\calvin-base\calvin\utilities\calvinconfig.py", line 302, in config_paths
    curr_loc, part = curr_loc.rsplit('/', 1)
ValueError: need more than 1 value to unpack

I fixed it by changing curr_loc, part = curr_loc.rsplit('/', 1) into curr_loc, part = curr_loc.rsplit('\\', 1) but it'd be better to use the os.sep or os.path.dirname and os.path.basename

@olaan
Copy link
Contributor

olaan commented Jan 26, 2018

We do not have easy access to windows based computers. Could you submit your recommendation as a pull request on the develop branch?

Cheers,

// Ola

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants