Which would return the string 'machine/', which leads to a MissingSchema: Invalid URL 'machine' when this string is passed as argument into self.__get_json_data.
First step would be to create a test case. After this look at adding http:// to start of url cadvisor is being initialised with if there is no procotol given.
Initialising a Cadvisor object without a protocol can result in errors when making requests to paths joined onto url.
For example:
Results in that Cadvisor instance's 'get' methods trying to
urljoin
a string onto127.0.0.1:8080
.For example calling
cad.get_machine_info()
:https://github.com/cgmcintyr/pycadvisor/blob/d15c00a0769792940b6253d85c9b3e2001715e5d/cadvisor/cadvisor.py#L39-L41
In this instance would result in callling
api.machine_info_url
withbase_url
arg set to127.0.0.1:8080
https://github.com/cgmcintyr/pycadvisor/blob/d15c00a0769792940b6253d85c9b3e2001715e5d/cadvisor/api.py#L13-L14
Which would return the string 'machine/', which leads to a
MissingSchema: Invalid URL 'machine'
when this string is passed as argument intoself.__get_json_data
.