cylc-flow icon indicating copy to clipboard operation
cylc-flow copied to clipboard

cylc review: can't handle suite names with special characters

Open dpmatthews opened this issue 6 years ago • 6 comments

If I create a suite named cylc-run/test and then try to list my suites using cylc review (7.8.4) I get:

500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last):
  File "/net/home/h03/fcm/cylc-7.8.4/lib/cherrypy/_cprequest.py", line 679, in respond
    response.body = self.handler()
  File "/net/home/h03/fcm/cylc-7.8.4/lib/cherrypy/lib/encoding.py", line 230, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/net/home/h03/fcm/cylc-7.8.4/lib/cherrypy/_cpdispatch.py", line 60, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/net/home/h03/fcm/cylc-7.8.4/lib/cylc/review.py", line 493, in suites
    return template.render(**data)
  File "/net/home/h03/fcm/cylc-7.8.4/lib/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/net/home/h03/fcm/cylc-7.8.4/lib/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/net/home/h03/fcm/cylc-7.8.4/lib/cylc/cylc-review/template/suites.html", line 170, in top-level template code
    <td><small>{{entry.name}}</small></td>
  File "/net/home/h03/fcm/cylc-7.8.4/lib/markupsafe/_native.py", line 22, in escape
    return Markup(text_type(s)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 4: ordinal not in range(128)

Probably not worth fixing at this stage?

dpmatthews avatar Nov 19 '19 15:11 dpmatthews

Probably not worth fixing at this stage?

Not sure, but if anyone works on this, there are other three or four cylc review bugs in the backlog too. Maybe we can tackle everything when moving to Cylc 8?

kinow avatar Nov 19 '19 20:11 kinow

See also #2979

oliver-sanders avatar Nov 22 '19 12:11 oliver-sanders

Closed by https://github.com/cylc/cylc-flow/pull/3274?

oliver-sanders avatar Jan 30 '20 20:01 oliver-sanders

Closed by #3274?

That will help a lot, but we still wouldn't want a manually-created cylc-run sub-directory to crash cylc review (users shouldn't do that, but they can)

hjoliver avatar Jan 30 '20 23:01 hjoliver

This happened again yesterday, so it's not fully resolved.

wxtim avatar Jan 31 '20 09:01 wxtim

Fair enough, actually I seem to remember someone creating a symlink to $HOME within cylc-run once, we wouldn't want the UI Server to be vulnerable to mess like that.

oliver-sanders avatar Feb 03 '20 21:02 oliver-sanders