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
Some of our ancient source files contained strings like this: r"C:\Users\AncientUser\Documents\whatever.csv"
Notice the r literal modifier. Upon scanning these, there is an exception in six. I'm not sure if this is six bug and even in that case it could be worked around in unused's end.
Finding all unused templates...
Getting global templates...
Done.
Getting app templates...
System check identified some issues:
Done.
Getting python files...
Done.
Creating Index.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................Traceback (most recent call last):
. File "/home/csaba/pycharm/helpers/pycharm/django_manage.py", line 52, in
run_command()
File "/home/csaba/pycharm/helpers/pycharm/django_manage.py", line 46, in run_command
run_module(manage_file, None, 'main', True)
File "/usr/lib/python2.7/runpy.py", line 188, in run_module
fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 82, in _run_module_code
mod_name, mod_fname, mod_loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/csaba/webapp/sportsboard/manage.py", line 15, in
execute_from_command_line(sys.argv)
File "/home/csaba/virtualenvs/live/local/lib/python2.7/site-packages/django/core/management/init.py", line 364, in execute_from_command_line
utility.execute()
File "/home/csaba/virtualenvs/live/local/lib/python2.7/site-packages/django/core/management/init.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/csaba/virtualenvs/live/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/csaba/virtualenvs/live/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
output = self.handle(*args, **options)
File "/home/csaba/virtualenvs/live/local/lib/python2.7/site-packages/django_unused/management/commands/unused.py", line 24, in handle
find_unused_templates()
File "/home/csaba/virtualenvs/live/local/lib/python2.7/site-packages/django_unused/management/commands/_templates.py", line 70, in find_unused_templates
content=six.u('/n'.join(f.readlines())))
File "/home/csaba/virtualenvs/live/local/lib/python2.7/site-packages/six.py", line 653, in u
return unicode(s.replace(r'\', r'\\'), "unicode_escape")
UnicodeDecodeError: 'unicodeescape' codec can't decode bytes in position 268-269: truncated \UXXXXXXXX escape
/home/csaba/virtualenvs/live/local/lib/python2.7/site-packages/backports/tempfile.py:61: RuntimeWarning: Implicitly cleaning up <TemporaryDirectory '/tmp/tmpZSCfP0'>
The text was updated successfully, but these errors were encountered:
MrCsabaToth
changed the title
unused templates crashes in case of 2.7 if python source countains string with backslash
unused templates crashes in case of 2.7 if python source countains certain string literal with backslash in it
Jun 28, 2018
Some of our ancient source files contained strings like this:
r"C:\Users\AncientUser\Documents\whatever.csv"
Notice the
r
literal modifier. Upon scanning these, there is an exception insix
. I'm not sure if this issix
bug and even in that case it could be worked around inunused
's end.The text was updated successfully, but these errors were encountered: