You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 13, 2022. It is now read-only.
File "C:\wc\...\lib\site-packages\react\jsx.py", line 50, in transform
with open(jsx_path, 'rU') as i:
IOError: [Errno 22] invalid mode ('rU') or filename: u"'C:\\...\\staticfiles\\jsx\\my_jsx_file.jsx'"
I currently hacked around it by replacing the transform(...) in C:\wc...\lib\site-packages\react\jsx.py with this:
def transform(self, jsx_path, js_path=None, **kwargs):
if jsx_path.startswith("'"):
jsx_path = jsx_path[1:-1]
with open(jsx_path, 'rU') as i:
js = self.transform_string(i.read(), **kwargs)
if js_path:
if js_path.startswith("'"):
js_path = js_path[1:-1]
with open(js_path, 'wb') as o:
o.write(js.encode('utf8'))
return js
Single quotes (') surround the
jsx_pathandjs_pathsent in from pipeline, as you can see from the error message thrown above. It comes from their shlex.quote call here: https://github.com/cyberdelia/django-pipeline/blob/master/pipeline/compilers/__init__.py#L43I currently hacked around it by replacing the transform(...) in C:\wc...\lib\site-packages\react\jsx.py with this: