Jupyter notebook does not show attributes for variables after pressing dot (".") - autocomplete does not work
I am experiencing an issue with the autocomplete functionality in Jupyter notebooks within PyCharm. When attempting to access the attributes of a variable retrieved from the Django ORM, pressing the dot (".") key does not trigger the expected dropdown list of attributes and methods. Instead, it only shows generic PyCharm templates, which do not include the specific attributes of the Django model instance that should be available. This issue is hindering the efficiency of my workflow, as I am unable to quickly access model properties and methods.
I have attached a screenshot for your reference where it can be seen that the variable 'x', which is an instance of a Django model, clearly possesses a plethora of attributes when inspected with dir(x). However, the autocomplete feature does not reflect these when I type 'x.' to try and list them. This behavior is not observed with other Python files outside of Jupyter notebooks, where the autocomplete feature works as expected.
As a comparison on Jupiter or Jupiter notebook on the browser the expected behaviour shows up after pressing dot. see 2nd Screenshot attached
请先登录再写评论。
i'm having the same issue - using the latest Intellij Ultimate edition - this is very painful when debugging notebooks - none of the attributes is optional when starting to type in watch section.. any ETA for this bug fix? Andrey Resler
Does it help if you change your variable name?
no it is not related - i'm not using django, i just have a notebook with plain python code.
as i said before, although all the defined variables are presented in the watch section - when i'm starting to type any variable name - it behaves like the variable is not defined - no autocomplete is working for the variable name - but when i'm pressing enter - it does recognize it.
it is a very frustrating bug i must say
Andrey Resler ?
Tomer Orenstein Hi, I was replying to the OP who uses Django. Could you please provide your code sample to reproduce the issue?
Feel free to submit a support ticket at https://intellij-support.jetbrains.com/hc/en-us/?pycharm and provide detailed description.