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

python3.4 issues #38

Open
ezekieldas opened this issue May 10, 2020 · 0 comments
Open

python3.4 issues #38

ezekieldas opened this issue May 10, 2020 · 0 comments

Comments

@ezekieldas
Copy link

Hi! When running influxspeedtest.py with python3.4 I get the following errors:

# python3.4 influxspeedtest.py

Loading Configuration File config.ini
Configuration Successfully Loaded
2020-05-10 16:35:36,789 - DEBUG: Testing connection to InfluxDb using provided credentials
Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/usr/lib/python3.4/site-packages/urllib3/connectionpool.py", line 384, in _make_request
    six.raise_from(e, None)
  File "<string>", line 2, in raise_from
  File "/usr/lib/python3.4/site-packages/urllib3/connectionpool.py", line 380, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib64/python3.4/http/client.py", line 1227, in getresponse
    response.begin()
  File "/usr/lib64/python3.4/http/client.py", line 386, in begin
    version, status, reason = self._read_status()
  File "/usr/lib64/python3.4/http/client.py", line 368, in _read_status
    raise BadStatusLine(line)
http.client.BadStatusLine:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/lib/python3.4/site-packages/urllib3/connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/lib/python3.4/site-packages/urllib3/util/retry.py", line 367, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/lib/python3.4/site-packages/urllib3/packages/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3.4/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/usr/lib/python3.4/site-packages/urllib3/connectionpool.py", line 384, in _make_request
    six.raise_from(e, None)
  File "<string>", line 2, in raise_from
  File "/usr/lib/python3.4/site-packages/urllib3/connectionpool.py", line 380, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib64/python3.4/http/client.py", line 1227, in getresponse
    response.begin()
  File "/usr/lib64/python3.4/http/client.py", line 386, in begin
    version, status, reason = self._read_status()
  File "/usr/lib64/python3.4/http/client.py", line 368, in _read_status
    raise BadStatusLine(line)
urllib3.exceptions.ProtocolError: ('Connection aborted.', BadStatusLine('\x15\x03\x01\x00\x02\x02\n',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/home/zeek/Speedtest-for-InfluxDB-and-Grafana/influxspeedtest/InfluxdbSpeedtest.py", line 41, in _get_influx_connection
    influx.get_list_users()  # TODO - Find better way to test connection and permissions
  File "/usr/lib/python3.4/site-packages/influxdb/client.py", line 928, in get_list_users
    return list(self.query("SHOW USERS").get_points())
  File "/usr/lib/python3.4/site-packages/influxdb/client.py", line 518, in query
    expected_response_code=expected_response_code
  File "/usr/lib/python3.4/site-packages/influxdb/client.py", line 333, in request
    timeout=self._timeout
  File "/usr/lib/python3.4/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.4/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3.4/site-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine('\x15\x03\x01\x00\x02\x02\n',))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "influxspeedtest.py", line 7, in <module>
    collector = InfluxdbSpeedtest()
  File "/opt/home/zeek/Speedtest-for-InfluxDB-and-Grafana/influxspeedtest/InfluxdbSpeedtest.py", line 17, in __init__
    self.influx_client = self._get_influx_connection()
  File "/opt/home/zeek/Speedtest-for-InfluxDB-and-Grafana/influxspeedtest/InfluxdbSpeedtest.py", line 46, in _get_influx_connection
    elif e.code == 401:
AttributeError: 'ConnectionError' object has no attribute 'code'

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