#6743 unicode paths in code browser 500 error [ss5542]

v1.1.0
closed
General
nobody
2015-08-20
2013-10-09
Chris Tsai
No

[forge:site-support:#5542]

If trying to click "völundr" -link under https://sourceforge.net/p/vlundr/code/ci/0471b70193ba34d2913f99fad300ed7efd979563/tree/stronglytyped-sortedbag/src/main/java/net/sf/
HTTP 500 with message "We're sorry but we weren't able to process this request." is given.

So something obviously wrong when using scandinavian letters (ä,ö,å) with package names.

I was sure we had a ticket for this, but I wasn't able to find it. Perhaps it was fixed and this is a recurrence...

Related

Tickets: #6743

Discussion

1 2 > >> (Page 1 of 2)
  • Dave Brondsema

    Dave Brondsema - 2013-10-31

    Error is:

    File '/var/local/allura/Allura/allura/model/repo.py', line 788 in _last_commit_id
      rev = commit.repo.log(commit._id, path, id_only=True).next()
    File '/var/local/allura/ForgeGit/forgegit/model/git_repo.py', line 308 in log
      for ci, refs, renamed in self._iter_commits_with_refs(*args):
    File '/var/local/allura/ForgeGit/forgegit/model/git_repo.py', line 381 in _iter_commits_with_refs
      proc = self._git.git.log(*args, format='%H%x00%d', as_process=True, **kwargs)
    File '/var/local/allura/ForgeGit/forgegit/model/git_repo.py', line 61 in log
      return self.client.log(*args, **kwargs)
    File '/var/local/env-allura/lib/python2.7/site-packages/GitPython-0.3.2.RC1_20131017-py2.7.egg/git/cmd.py', line 228 in <lambda>
      return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
    File '/var/local/env-allura/lib/python2.7/site-packages/GitPython-0.3.2.RC1_20131017-py2.7.egg/git/cmd.py', line 451 in _call_process
      ext_args = self.__unpack_args([a for a in args if a is not None])
    File '/var/local/env-allura/lib/python2.7/site-packages/GitPython-0.3.2.RC1_20131017-py2.7.egg/git/cmd.py', line 410 in __unpack_args
      outlist.extend(cls.__unpack_args( arg ))
    File '/var/local/env-allura/lib/python2.7/site-packages/GitPython-0.3.2.RC1_20131017-py2.7.egg/git/cmd.py', line 405 in __unpack_args
      return [ str(arg_list) ]
    UnicodeEncodeError: 'ascii' codec can't encode character u'\\xf6' in position 46: ordinal not in range(128)
    
     
  • Dave Brondsema

    Dave Brondsema - 2013-10-31
    • Labels: support, p3 --> p3, support, 42cc
     
  • Igor Bondarenko - 2013-11-01
    • status: open --> in-progress
     
  • Igor Bondarenko - 2013-11-01

    Created #471: [#6743] unicode paths in code browser 500 error (1cp)

     

    Related

    Tickets: #6743

  • Igor Bondarenko - 2013-11-05
    • status: in-progress --> code-review
     
  • Igor Bondarenko - 2013-11-05

    Closed #471. je/42cc_6743

     
    • QA: Tim Van Steenburgh
    • Milestone: limbo --> forge-nov-15
     
    • status: code-review --> in-progress
     
  • ForgeHg needs to be fixed also.

     
  • Igor Bondarenko - 2013-11-12
    • status: in-progress --> code-review
     
  • Igor Bondarenko - 2013-11-12

    Closed #478.

    forgehg:je/42cc_6743

     
  • Dave Brondsema

    Dave Brondsema - 2013-11-15
    • Milestone: forge-nov-15 --> forge-nov-29
     
    • status: code-review --> blocked
     
  • Bump ForgeHg version to 0.1.18 once https://trac.sdot.me/trac/siteops/ticket/54608 is done.

     
    • status: blocked --> closed
     
  • Well the prior changes did help the common case, but there is a different exception happening for this repo in particular:

    Error - <class 'bson.errors.InvalidStringData'>: regex patterns must be valid UTF-8
    URL: https://sourceforge.net/p/vlundr/code/ci/0471b70193ba34d2913f99fad300ed7efd979563/tree/stronglytyped-sortedbag/src/main/java/net/sf/v%C3%B6lundr/
    File '/var/local/env-allura/lib/python2.7/site-packages/Jinja2-2.6-py2.7.egg/jinja2/environment.py', line 894 in render
      return self.environment.handle_exception(exc_info, True)
    File '/var/local/allura/Allura/allura/templates/repo/tree.html', line 20 in top-level template code
      {% do g.register_forge_css('css/forge/hilite.css') %}
    File '/var/local/allura/Allura/allura/templates/repo/repo_master.html', line 138 in top-level template code
      <span class="scm-tag-label">{{t}}</span>
    File '/var/local/allura/Allura/allura/templates/jinja_master/master.html', line 118 in top-level template code
      {% block content %}{% endblock %}
    File '/var/local/allura/Allura/allura/templates/repo/tree.html', line 79 in block "content"
      {{c.tree_widget.display(repo=repo, commit=commit, tree=tree, path=path)}}
    File '/var/local/env-allura/lib/python2.7/site-packages/EasyWidgets-0.2dev_20130716-py2.7.egg/ew/widget.py', line 45 in display
      return self.template(context)
    File '/var/local/env-allura/lib/python2.7/site-packages/EasyWidgets-0.2dev_20130716-py2.7.egg/ew/render.py', line 32 in __call__
      return self.engine.render(self.template, context)
    File '/var/local/allura/Allura/allura/config/app_cfg.py', line 128 in render
      text = template.render(**context)
    File '/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.4-py2.7.egg/timermiddleware/__init__.py', line 117 in wrapper
      return self.run_and_log(func, inst, *args, **kwargs)
    File '/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.4-py2.7.egg/timermiddleware/__init__.py', line 142 in run_and_log
      retval = func(*args, **kwargs)
    File '/var/local/env-allura/lib/python2.7/site-packages/Jinja2-2.6-py2.7.egg/jinja2/environment.py', line 894 in render
      return self.environment.handle_exception(exc_info, True)
    File '/var/local/allura/Allura/allura/templates/widgets/repo/tree_widget.html', line 21 in top-level template code
      {% set ls = list(tree.ls()) %}
    File '/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.4-py2.7.egg/timermiddleware/__init__.py', line 117 in wrapper
      return self.run_and_log(func, inst, *args, **kwargs)
    File '/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.4-py2.7.egg/timermiddleware/__init__.py', line 142 in run_and_log
      retval = func(*args, **kwargs)
    File '/var/local/allura/Allura/allura/model/repo.py', line 537 in ls
      old_style_results = self.ls_old()
    File '/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.4-py2.7.egg/timermiddleware/__init__.py', line 117 in wrapper
      return self.run_and_log(func, inst, *args, **kwargs)
    File '/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.4-py2.7.egg/timermiddleware/__init__.py', line 142 in run_and_log
      retval = func(*args, **kwargs)
    File '/var/local/allura/Allura/allura/model/repo.py', line 594 in ls_old
      for lc in LastCommitDoc_old.m.find(dict(_id=id_re)))
    File '/var/local/allura/Allura/allura/model/repo.py', line 593 in <genexpr>
      (lc.name, lc.commit_info)
    File '/var/local/env-allura/lib/python2.7/site-packages/Ming-0.4.2-py2.7.egg/ming/base.py', line 74 in next
      doc = self.cursor.next()
    File '/var/local/env-allura/lib/python2.7/site-packages/pymongo-2.4.2-py2.7-linux-x86_64.egg/pymongo/cursor.py', line 814 in next
      if len(self.__data) or self._refresh():
    File '/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.4-py2.7.egg/timermiddleware/__init__.py', line 117 in wrapper
      return self.run_and_log(func, inst, *args, **kwargs)
    File '/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.4-py2.7.egg/timermiddleware/__init__.py', line 142 in run_and_log
      retval = func(*args, **kwargs)
    File '/var/local/env-allura/lib/python2.7/site-packages/pymongo-2.4.2-py2.7-linux-x86_64.egg/pymongo/cursor.py', line 763 in _refresh
      self.__uuid_subtype))
    InvalidStringData: regex patterns must be valid UTF-8
    
     
    • status: closed --> open
     
  • Dave Brondsema

    Dave Brondsema - 2013-11-20

    The error is when it's checking ls_old / LastCommitDoc_old which is legacy fallback data structures. Maybe its time to remove that anyway.

     
  • Dave Brondsema

    Dave Brondsema - 2013-12-02
    • Milestone: forge-nov-29 --> forge-dec-13
     
  • Dave Brondsema

    Dave Brondsema - 2013-12-13
    • Milestone: forge-dec-13 --> forge-dec-27
     
  • Dave Brondsema

    Dave Brondsema - 2013-12-13
    • Size: --> 1
     
  • Dave Brondsema

    Dave Brondsema - 2013-12-13
    • labels: p3, support, 42cc --> p3, support
     
  • Dave Brondsema

    Dave Brondsema - 2014-01-02
    • Milestone: forge-dec-27 --> forge-jan-10
     
  • Dave Brondsema

    Dave Brondsema - 2014-01-02
    • status: open --> in-progress
    • assigned_to: Dave Brondsema
    • QA: Tim Van Steenburgh --> nobody
     
  • Dave Brondsema

    Dave Brondsema - 2014-01-02
    • status: in-progress --> closed
     
1 2 > >> (Page 1 of 2)

Log in to post a comment.