Skip to content

Error throw every time an opening bracket is written #465

Open

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.

Activity

  1. Danielnewheart commented on May 13, 2022

    @Danielnewheart

    I have the same problem. I use MacBook Pro 2015, Monterey 12.1, and the same version of atom.
    It's really annoying to me, hoping someone can solve this problem
    截圖 2022-05-13 17 28 59
    .

  2. added a commit that references this issue on Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions