我有一个python信息库,它试图与网络上可用的数据库连接并收集相关数据。现在,当我从本地计算机运行存储库时,将获得所需的数据库,并因此获得输出。
但是,当我从Windows Server运行相同的代码并尝试连接相同的网站(代理)时,出现上述错误。
(ssf) C:\Users\admin-prakuma3\data-model_1>python main.py
Traceback (most recent call last):
File "main.py", line 612, in <module>
salesforce_daily_extractors()
File "main.py", line 44, in salesforce_daily_extractors
'StartDate': 'StartDate'
File "C:\Users\admin-prakuma3\data-model_1\SalesforceExtractor.py", line 23, in __run__
fields = sg.getConnection(sg).__getattr__(sfdc_object).describe()['fields']
File "C:\Users\admin-prakuma3\data-model_1\SalesforceGateway.py", line 19, in getConnection
security_token='************', proxies="*******:8080")
File "C:\Users\admin-prakuma3\.conda\envs\ssf\lib\site-packages\simple_salesforce\api.py", line 146, in __init__
domain=self.domain)
File "C:\Users\admin-prakuma3\.conda\envs\ssf\lib\site-packages\simple_salesforce\login.py", line 168, in SalesforceLogin
proxies=proxies)
File "C:\Users\admin-prakuma3\.conda\envs\ssf\lib\site-packages\requests\sessions.py", line 535, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "C:\Users\admin-prakuma3\.conda\envs\ssf\lib\site-packages\requests\sessions.py", line 479, in request
prep.url, proxies, stream, verify, cert
File "C:\Users\admin-prakuma3\.conda\envs\ssf\lib\site-packages\requests\sessions.py", line 656, in merge_environment_settings
proxies.setdefault(k, v)
AttributeError: 'str' object has no attribute 'setdefault'