我收到 useNewUrlParser、useUnifiedTopology、useCreateIndex 的以下错误:
No overload matches this call.
Overload 1 of 3, '(uri: string, callback: CallbackWithoutResult): void', gave the following error.
Argument of type '{ useNewUrlParser: boolean; useUnifiedTopology: boolean; useCreateIndex: boolean; }' is not assignable to parameter of type 'CallbackWithoutResult'.
Object literal may only specify known properties, and 'useNewUrlParser' does not exist in type 'CallbackWithoutResult'.
Overload 2 of 3, '(uri: string, options?: ConnectOptions | undefined): Promise<typeof import("mongoose")>', gave the following error.
Argument of type '{ useNewUrlParser: boolean; useUnifiedTopology: boolean; useCreateIndex: …
Run Code Online (Sandbox Code Playgroud) 我是 python 新手,我想 pyCharm 是 python 最受欢迎的 IDE,但如果可能的话,我想坚持使用 vscode。我在 vscode 中安装了 python 扩展,并且自动完成功能对于默认 python 包运行良好,但对于pillow 或 PyPDF2 等外部包则不起作用。我创建了一个虚拟环境,在其中使用 pip 安装了上述 2 个软件包,甚至检查了这些软件包是否使用pip freeze
. 点冻结显示:
枕头==9.0.1
PyPDF2==1.26.0
下面是我的项目结构。我需要从 basic.py 导入 PyPDF2 模块。另外,如果有帮助的话,我正在使用 python 3.9.6。非常感谢任何帮助或建议。