Skip to content

Error throw every time an opening bracket is written #465

@driuba

Description

@driuba

Prerequisites

  • Please make sure to properly configure plugin first if you simply cannot see any completions.
  • It's always helpful if you include debug logs with your issue:
    • Go to package settings to enable them
      image
    • Open dev tools using command palette and you should see some autocomplete-python records in console tab. This will include parts of your code – make sure to remove everything you don't want to share.

Steps to Reproduce

  1. Write a bracket, e. g.:
variable = ()
variable = []
variable = {}

Expected behavior:
No error to be displayed.

Actual behavior:
Error is throw every time by autocomplete-python
image

No issues with function definitions and calls, the issue seems to be triggered when single bracket is being written (like when using list comprehensions or declaring variables).

Error text:

autocomplete-python traceback output:

Traceback (most recent call last):
  File "/home/driuba/.atom/packages/autocomplete-python/lib/completion.py", line 381, in watch
    self._process_request(request)
  File "/home/driuba/.atom/packages/autocomplete-python/lib/completion.py", line 349, in _process_request
    return self._write_response(self._serialize_tooltip(
  File "/home/driuba/.atom/packages/autocomplete-python/lib/completion.py", line 275, in _serialize_tooltip
    'line': definition.line - 1,
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'

OS info:
image

Atom info:
image

autocomplete-python info:
image


P. S.
Other functionality works as expected without issues. The error message does not seem to be critical, however it is very annoying as it spams a lot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions