SwissDataScienceCenter / renku-python

A Python library for the Renku collaborative data science platform.
https://renku-python.readthedocs.io/
Apache License 2.0
37 stars 29 forks source link

renku init fails on windows 10 #1086

Closed adriente closed 3 years ago

adriente commented 4 years ago

Describe the bug I tried to start a renku project locally in an empty folder on windows 10 using the renku init command. The task could not be completed and send me an error message back. Trying again with the --force option throws the same error message.

To Reproduce Steps to reproduce the behavior:

  1. run pip install renku
  2. Make a new folder
  3. Go there using the windows command prompt
  4. Type renku init
  5. Select 1 Basic python project (and select "print the error" when asked)
  6. See the error

Execution output I am sorry, it is messy but it is the most complete information i can provide.

C:\Users\teurtrie\Travail\renku_struct_mat_fact>renku init 
NUMBER  NAME                  DESCRIPTION                                                                                                                                                                                         1  Basic Python Project  The simplest Python-based renku project with a basic directory structure and necessary supporting files.                                                                                                               2  Basic R Project       The simplest R-based renku project with a basic directory structure and necessary supporting files.                                                                                                             Please choose a template by typing the number: 1                                                                        Initializing new Renku repository... Ahhhhhhhh! You have found a bug. 🐞                      
1. Open an issue by typing "open";                                                                                      
2. Print human-readable information by typing "print";                                                                  
3. See the full traceback without submitting details (default: "ignore").                         
Please select an action by typing its name (open, print, ignore) [ignore]: open                                         

Traceback (most recent call last):                                                                                        
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\site-packages\renku                                                      \cli\exception_handler.py", line 119, in main                                                                                                                    result = super().main(*args, **kwargs)                                                                                
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\site-packages\renku\cli\exception_handler.py", line 90, in main                                                                                                           return super().main(*args, **kwargs)                                                                                  
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\site-packages\click\core.py", line 717, in main             rv = self.invoke(ctx)                                                                                                 
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\site-packages\click\core.py", line 1137, in invoke          return _process_result(sub_ctx.command.invoke(sub_ctx))                                                               
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\site-packages\click\core.py", line 956, in invoke           return ctx.invoke(self.callback, **ctx.params)                                                                        File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\site-packages\click\core.py", line 555, in invoke           return callback(*args, **kwargs)                                                                                      File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\site-packages\renku\core\commands\client.py", line 103, in new_func                                                                                                                 result = ctx.invoke(method, client, *args, **kwargs)                                                                  
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\site-packages\click\core.py", line 555, in invoke           return callback(*args, **kwargs)                                                                                      File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\site-packages\click\decorators.py", line 17, in new_func                                                                                                                            return f(get_current_context(), *args, **kwargs)                                                                      
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\site-packages\renku\cli\init.py", line 331, in init         force                                                                                                                 
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\site-packages\renku\core\commands\init.py", line 175, in create_from_template                                                                                                       client.import_from_template(template_path, metadata, force)                                                           File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\site-packages\renku\core\management\repository.py", line 424, in import_from_template                                                                                               template = Template(file.read_text())                                                                                 
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\pathlib.py", line 1206, in read_text                        with self.open(mode='r', encoding=encoding, errors=errors) as f:                                                      File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\pathlib.py", line 1193, in open                             opener=self._opener)                                                                                                  
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\pathlib.py", line 1046, in _opener                          return self._accessor.open(self, flags, mode)                                                                       PermissionError: [Errno 13] Permission denied: 'c:\\users\\teurtrie\\appdata\\local\\continuum\\anaconda3\\lib\\site-packages\\renku\\templates\\python-minimal\\.renku'                                                                                                                                                                                                

During handling of the above exception, another exception occurred:                                                                                                                                                                             

Traceback (most recent call last):                                                                                        
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\runpy.py", line 193, in _run_module_as_main                 "__main__", mod_spec)                                                                                                 
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\runpy.py", line 85, in _run_code                            exec(code, run_globals)                                                                                               
File "C:\Users\teurtrie\AppData\Local\Continuum\anaconda3\Scripts\renku.exe\__main__.py", line 9, in <module>           File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\site-packages\click\core.py", line 764, in __call__         return self.main(*args, **kwargs)                                                                                     File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\site-packages\renku\cli\exception_handler.py", line 128, in main                                                                                                                    self._handle_github()                                                                                                 
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\site-packages\renku\cli\exception_handler.py", line 175, in _handle_github                                                                                                          getattr(self, '_process_' + value)()                                                                                  
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\site-packages\renku\cli\exception_handler.py", line 213, in _process_open                                                                                                           click.launch(self._format_issue_url())                                                                                
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\site-packages\renku\cli\exception_handler.py", line 207, in _format_issue_url                                                                                                       
'body': self._format_issue_body(),                                                                                    
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\site-packages\renku\cli\exception_handler.py", line 190, in _format_issue_body                                                                                                      
tb = re.sub(re_paths, '[...]', traceback.format_exc(limit=limit))                                                     
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\re.py", line 192, in sub                                    return _compile(pattern, flags).sub(repl, string, count)                                                              
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\re.py", line 286, in _compile                               p = sre_compile.compile(pattern, flags)                                                                               
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\sre_compile.py", line 764, in compile                       p = sre_parse.parse(p, flags)                                                                                         
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\sre_parse.py", line 930, in parse                           p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0)                                                          File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\sre_parse.py", line 426, in _parse_sub                      not nested and not items))                                                                                            
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\sre_parse.py", line 816, in _parse                          p = _parse_sub(source, state, sub_verbose, nested + 1)                                                                
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\sre_parse.py", line 426, in _parse_sub                      not nested and not items))                                                                                            
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\sre_parse.py", line 507, in _parse                          code = _escape(source, this, state)                                                                                   
File "c:\users\teurtrie\appdata\local\continuum\anaconda3\lib\sre_parse.py", line 363, in _escape                         raise source.error("incomplete escape %s" % escape, len(escape))                                                    re.error: incomplete escape \u at position 3

Run environment (please complete the following information):

Panaetius commented 3 years ago

We do not officially support Windows, but it should work with the Windows Subsystem for Linux (WSL), see https://github.com/SwissDataScienceCenter/renku-python#windows