简体   繁体   English

找不到simple_salesforce方法

[英]simple_salesforce method not found

So I'm using the simple_salesforce module and have been playing around with the querying examples on the site . 因此,我正在使用simple_salesforce模块,并一直在该站点上使用查询示例。

So if I run the following code in Spyder/Conda, I end up with the following error. 因此,如果我在Spyder / Conda中运行以下代码,则会出现以下错误。

query = 'SELECT Id, Name FROM Account LIMIT 10'

sf.bulk.Account.query(query)

 'SFType' object has no attribute 'Account'

However, if I run it in the terminal using the IDLE interpreter it works fine and produces the desired result. 但是,如果我使用IDLE解释器在终端中运行它,则可以正常工作并产生所需的结果。

Why is this work find in one situation and not in another? 为什么这项工作在一种情况下找到而在另一种情况下却找不到?

The package that I got when running this seemed broken: 运行此程序时得到的包似乎坏了:

conda install -c conda-forge simple-salesforce

I uninstalled that package, cloned the simple_salesforce source code, went to its root directory, and wrote: 我卸载了该软件包,克隆了simple_salesforce源代码,转到其根目录,并写道:

pip install .

Works now. 现在可以使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM