{"action":"created","issue":{"url":"https://api.github.com/repos/davidhalter/jedi/issues/1081","repository_url":"https://api.github.com/repos/davidhalter/jedi","labels_url":"https://api.github.com/repos/davidhalter/jedi/issues/1081/labels{/name}","comments_url":"https://api.github.com/repos/davidhalter/jedi/issues/1081/comments","events_url":"https://api.github.com/repos/davidhalter/jedi/issues/1081/events","html_url":"https://github.com/davidhalter/jedi/issues/1081","id":313201923,"number":1081,"title":"Exception: There's an issue (XXX != XXX) with the diff parser","user":{"login":"galeo","id":1025559,"avatar_url":"https://avatars0.githubusercontent.com/u/1025559?v=4","gravatar_id":"","url":"https://api.github.com/users/galeo","html_url":"https://github.com/galeo","followers_url":"https://api.github.com/users/galeo/followers","following_url":"https://api.github.com/users/galeo/following{/other_user}","gists_url":"https://api.github.com/users/galeo/gists{/gist_id}","starred_url":"https://api.github.com/users/galeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/galeo/subscriptions","organizations_url":"https://api.github.com/users/galeo/orgs","repos_url":"https://api.github.com/users/galeo/repos","events_url":"https://api.github.com/users/galeo/events{/privacy}","received_events_url":"https://api.github.com/users/galeo/received_events","type":"User","site_admin":false},"labels":[{"id":17235917,"url":"https://api.github.com/repos/davidhalter/jedi/labels/bug","name":"bug","color":"e10c02","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-11T07:20:54Z","updated_at":"2018-05-16T06:55:12Z","closed_at":null,"author_association":"NONE","body":"There are lots of **Exception** errors occurred **randomly** with the diff parser reporting that **\"there is an issue (XXX != XXX)...\"**\r\n\r\nHere is an example file code:\r\n```python\r\nfrom django import forms\r\nfrom django.forms.widgets import Textarea\r\n\r\nfrom django_comments.forms import CommentForm\r\nfrom django_comments.forms import COMMENT_MAX_LENGTH▌# <-- cursor is here\r\n```\r\n\r\n**The error log:**\r\n```\r\nException(\"There's an issue (16 != 6) with the diff parser. Please report:\r\n---\r\n+++\r\n@@ -3,14 +3,4 @@\r\n\r\n from django_comments.forms import CommentForm\r\n from django_comments.forms import COMMENT_MAX_LENGTH\r\n-\r\n-\r\n-\r\n-\r\n-\r\n-\r\n-\r\n-\r\n-\r\n-\r\n \",)\r\n```\r\nThis issue may relate to #1000,  which you recently closed.\r\n\r\nThanks for your great work on this tool!"},"comment":{"url":"https://api.github.com/repos/davidhalter/jedi/issues/comments/389414581","html_url":"https://github.com/davidhalter/jedi/issues/1081#issuecomment-389414581","issue_url":"https://api.github.com/repos/davidhalter/jedi/issues/1081","id":389414581,"user":{"login":"alwc","id":1621953,"avatar_url":"https://avatars0.githubusercontent.com/u/1621953?v=4","gravatar_id":"","url":"https://api.github.com/users/alwc","html_url":"https://github.com/alwc","followers_url":"https://api.github.com/users/alwc/followers","following_url":"https://api.github.com/users/alwc/following{/other_user}","gists_url":"https://api.github.com/users/alwc/gists{/gist_id}","starred_url":"https://api.github.com/users/alwc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alwc/subscriptions","organizations_url":"https://api.github.com/users/alwc/orgs","repos_url":"https://api.github.com/users/alwc/repos","events_url":"https://api.github.com/users/alwc/events{/privacy}","received_events_url":"https://api.github.com/users/alwc/received_events","type":"User","site_admin":false},"created_at":"2018-05-16T06:55:12Z","updated_at":"2018-05-16T06:55:12Z","author_association":"NONE","body":"I come across the same problem too. Here is a reproducible case:\r\n\r\n1. `<leader>g` on [`predict`](https://github.com/fastai/fastai/blob/master/fastai/learner.py#L357)\r\n2. `<leader>g` on [`predict_with_targs_ `](https://github.com/fastai/fastai/blob/master/fastai/model.py#L223)\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/alex/dotfiles/nvim/plugged/jedi-vim/pythonx/jedi_vim.py\", line 141, in wrapper\r\n    return func(*args, **kwargs)\r\n  File \"/home/alex/dotfiles/nvim/plugged/jedi-vim/pythonx/jedi_vim.py\", line 214, in get_script\r\n    environment=get_environment(),\r\n  File \"/home/alex/dotfiles/nvim/plugged/jedi-vim/pythonx/jedi/jedi/api/__init__.py\", line 119, in __init__\r\n    cache_path=settings.cache_directory\r\n  File \"/home/alex/dotfiles/nvim/plugged/jedi-vim/pythonx/jedi/jedi/evaluate/__init__.py\", line 383, in parse_and_get_code\r\n    return self.grammar.parse(code=code, path=path, **kwargs), code\r\n  File \"/home/alex/dotfiles/nvim/plugged/jedi-vim/pythonx/parso/parso/grammar.py\", line 76, in parse\r\n    return self._parse(code=code, **kwargs)\r\n  File \"/home/alex/dotfiles/nvim/plugged/jedi-vim/pythonx/parso/parso/grammar.py\", line 126, in _parse\r\n    new_lines=lines\r\n  File \"/home/alex/dotfiles/nvim/plugged/jedi-vim/pythonx/parso/parso/python/diff.py\", line 163, in update\r\n    % (last_pos, line_length, ''.join(diff))\r\nException: There's an issue (284 != 283) with the diff parser. Please report:\r\n---\r\n+++\r\n@@ -280,5 +280,4 @@\r\n\r\n     for h in hooks: h.remove()\r\n     return summary\r\n-\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/alex/dotfiles/nvim/plugged/jedi-vim/pythonx/jedi_vim.py\", line 141, in wrapper\r\n    return func(*args, **kwargs)\r\n  File \"/home/alex/dotfiles/nvim/plugged/jedi-vim/pythonx/jedi_vim.py\", line 305, in goto\r\n    definitions = script.goto_assignments()\r\nAttributeError: 'NoneType' object has no attribute 'goto_assignments'\r\n```"}}
{"actor":{"display_login":"alwc"}}