Imports not working / Python

Hello,  installed rethinkdb via pip and wanted to use it, but i am facing a problem which i cant resolve.

If i can init a RethinkDB Object and write a peace of code for it. But if i apply methods to that object intellij dont find the methods and mark the code yellow. Indeed i can run this code, the "precompiling" of intellij is not working. I discovered that the __init__ method of imports the modules where are the methods are located. But Intellij dont include them in precompiling, so me whole code is yellow and i dont get code suggestion/completion. I dont know what i can do, maybe someone had this problem too, and know an answer. Ive already tried Invalidate Cache / Restart and deleted .idea.

Maybe someone could try to reproduce the problem to see if its a common problem.

Code: 

import rethinkdb as rdb
mydb = rdb.RethinkDB()
mydb.connect("localhost", 32770).repl()
mydb.db("test").table_create("authors").run()

rdb.table("authors").insert([
{"name": "William Adama", "tv_show": "Battlestar Galactica",
"posts": [
{"title": "Decommissioning speech", "content": "The Cylon War is long over..."},
{"title": "We are at war", "content": "Moments ago, this ship received..."},
{"title": "The new Earth", "content": "The discoveries of the past few days..."}
]
}]).run()

the .db() and .table() is yellow and intellij dont find the methods.

Using IntelliJ IDEA 2019.3.1

Thanks in advance

greetings

0

Hi,

I'm not sure what you mean by "precompiling", since python code is compiled automatically by the interpreter as you run it. 

Do I understand correctly that the code sample you provided is executed without errors and inserts the db row correctly? If this is the case, I suggest to submit a bug report about this false-positive to https://youtrack.jetbrains.com/issues 

0

请先登录再写评论。