Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error talking to server: a bytes-like object is required, not 'str' - python3 #57

Open
marif1989 opened this issue Jul 17, 2020 · 0 comments

Comments

@marif1989
Copy link

I am using the python3.
facing a many issues with python3 with this plugin. however i think i am very near to make this working..
I am facing below error...when i removed the proxy

./cron.ES.sh xxxxxxxxxx cssdev xxxxxxxxxxx xxxxxxxx xxxxxxxxxx ap-southeast-1
Error talking to server: a bytes-like object is required, not 'str'

if i keep the proxy I am getting below error...

Traceback (most recent call last):
File "/usr/lib/zabbix/externalscripts/zabbixCloudWatch.py", line 394, in
cw_data = getCloudWatchData(aws_account, aws_region, aws_service, dimensions)
File "/usr/lib/zabbix/externalscripts/zabbixCloudWatch.py", line 181, in getCloudWatchData
results = cw.get_metric_statistics(period, start_time, end_time, metric_name, namespace, statistics, dimensions)
File "/var/lib/zabbix/my_app/env/lib64/python3.6/site-packages/boto/ec2/cloudwatch/init.py", line 239, in get_metric_statistics
[('member', Datapoint)])
File "/var/lib/zabbix/my_app/env/lib64/python3.6/site-packages/boto/connection.py", line 1170, in get_list
response = self.make_request(action, params, path, verb)
File "/var/lib/zabbix/my_app/env/lib64/python3.6/site-packages/boto/connection.py", line 1116, in make_request
return self._mexe(http_request)
File "/var/lib/zabbix/my_app/env/lib64/python3.6/site-packages/boto/connection.py", line 913, in _mexe
self.is_secure)
File "/var/lib/zabbix/my_app/env/lib64/python3.6/site-packages/boto/connection.py", line 705, in get_http_connection
return self.new_http_connection(host, port, is_secure)
File "/var/lib/zabbix/my_app/env/lib64/python3.6/site-packages/boto/connection.py", line 747, in new_http_connection
connection = self.proxy_ssl(host, is_secure and 443 or 80)
File "/var/lib/zabbix/my_app/env/lib64/python3.6/site-packages/boto/connection.py", line 796, in proxy_ssl
sock.sendall("CONNECT %s HTTP/1.0\r\n" % host)
TypeError: a bytes-like object is required, not 'str'

Could you please provide some hint to make it work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant