negative timestamp in installed ssm patches list of EC2 instance - python-2.7

I want to get all the installed patches on an AWS EC2 instance, So I run this code in boto3:
response = client.describe_instance_patches(InstanceId=instance_id, Filters=[{'Key': 'State','Values': ['Installed',]} ])
My instance has a patch with a negative timestamp :
{
"Patches": [
{
"KBId": "KB3178539",
"Severity": "Important",
"Classification": "SecurityUpdates",
"Title": "Security Update for Windows 8.1 (KB3178539)",
"State": "Installed",
"InstalledTime": 1483574400.0
},
{
"KBId": "KB4493446",
"Severity": "Critical",
"Classification": "SecurityUpdates",
"Title": "2019-04 Security Monthly Quality Rollup for Windows 8.1 for x64-based Systems (KB4493446)",
"State": "Installed",
"InstalledTime": 1555804800.0
},
{
"KBId": "KB4487080",
"Severity": "Important",
"Classification": "SecurityUpdates",
"Title": "2019-02 Security and Quality Rollup for .NET Framework 3.5, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2 for Windows 8.1 (KB4487080)",
"State": "Installed",
"InstalledTime": -62135596800.0
}
]
}
So my boto3 snippet gives me this error:
response = client.describe_instance_patches(InstanceId=instance_id, Filters=[{'Key': 'State','Values': ['Installed',]}, ])
File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 357, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 648, in _make_api_call
operation_model, request_dict, request_context)
File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 667, in _make_request
return self._endpoint.make_request(operation_model, request_dict)
File "/usr/local/lib/python2.7/dist-packages/botocore/endpoint.py", line 102, in make_request
return self._send_request(request_dict, operation_model)
File "/usr/local/lib/python2.7/dist-packages/botocore/endpoint.py", line 135, in _send_request
request, operation_model, context)
File "/usr/local/lib/python2.7/dist-packages/botocore/endpoint.py", line 167, in _get_response
request, operation_model)
File "/usr/local/lib/python2.7/dist-packages/botocore/endpoint.py", line 218, in _do_get_response
response_dict, operation_model.output_shape)
File "/usr/local/lib/python2.7/dist-packages/botocore/parsers.py", line 242, in parse
parsed = self._do_parse(response, shape)
File "/usr/local/lib/python2.7/dist-packages/botocore/parsers.py", line 740, in _do_parse
parsed = self._handle_json_body(response['body'], shape)
File "/usr/local/lib/python2.7/dist-packages/botocore/parsers.py", line 761, in _handle_json_body
return self._parse_shape(shape, parsed_json)
File "/usr/local/lib/python2.7/dist-packages/botocore/parsers.py", line 302, in _parse_shape
return handler(shape, node)
File "/usr/local/lib/python2.7/dist-packages/botocore/parsers.py", line 572, in _handle_structure
raw_value)
File "/usr/local/lib/python2.7/dist-packages/botocore/parsers.py", line 302, in _parse_shape
return handler(shape, node)
File "/usr/local/lib/python2.7/dist-packages/botocore/parsers.py", line 310, in _handle_list
parsed.append(self._parse_shape(member_shape, item))
File "/usr/local/lib/python2.7/dist-packages/botocore/parsers.py", line 302, in _parse_shape
return handler(shape, node)
File "/usr/local/lib/python2.7/dist-packages/botocore/parsers.py", line 572, in _handle_structure
raw_value)
File "/usr/local/lib/python2.7/dist-packages/botocore/parsers.py", line 302, in _parse_shape
return handler(shape, node)
File "/usr/local/lib/python2.7/dist-packages/botocore/parsers.py", line 589, in _handle_timestamp
return self._timestamp_parser(value)
File "/usr/local/lib/python2.7/dist-packages/botocore/utils.py", line 558, in parse_timestamp
return datetime.datetime.fromtimestamp(value, tzlocal())
File "/usr/local/lib/python2.7/dist-packages/dateutil/tz/_common.py", line 144, in fromutc
return f(self, dt)
File "/usr/local/lib/python2.7/dist-packages/dateutil/tz/_common.py", line 258, in fromutc
dt_wall = self._fromutc(dt)
File "/usr/local/lib/python2.7/dist-packages/dateutil/tz/_common.py", line 222, in _fromutc
dtoff = dt.utcoffset()
File "/usr/local/lib/python2.7/dist-packages/dateutil/tz/tz.py", line 216, in utcoffset
if self._isdst(dt):
File "/usr/local/lib/python2.7/dist-packages/dateutil/tz/tz.py", line 288, in _isdst
if self.is_ambiguous(dt):
File "/usr/local/lib/python2.7/dist-packages/dateutil/tz/tz.py", line 250, in is_ambiguous
(naive_dst != self._naive_is_dst(dt - self._dst_saved)))
OverflowError: date value out of range
I need to get the installed patches of several instances and I don't want the script to break when it finds a negative timestamp. How can workaround this ? How can I use the filters to get only valid timestamps ?

try:
response = client.describe_instance_patches(InstanceId=instance_id, Filters=[{'Key': 'State','Values': ['Installed',]} ])
except OverflowError:
//handle the exception as you want. Print a log, ignore, whatever.

I got this working by using subprocess with aws cli instead of boto3:
response = subprocess.Popen(["aws", "ssm", "describe-instance-patches", "--instance-id", instance_id, "--filters","Key=State,Values=Installed", "--profil", "prod", "--output", "json"], stdout=subprocess.PIPE).stdout.read()

Related

textract_python_table_parser.py command prompt lacking credentials

I'm trying to put to work AWS's Textract export table suggestion in this link
I'm a complete newbie in AWS's solutions and in command prompt so I'm trying to do exactly as they suggest. I'm running that in python so I'm using this piece of code:
import os
k=os.system("python textract_python_table_parser.py my_pdf_file_path.pdf")
print(k)
The code runs, I get an Image loaded my_pdf_file_path.pdf however at some point it bugs on credential matters:
Traceback (most recent call last):
File "/Users/santanna_santanna/PycharmProjects/KlooksExplore/PDFWork/textract_python_table_parser.py", line 108, in <module>
main(file_name)
File "/Users/santanna_santanna/PycharmProjects/KlooksExplore/PDFWork/textract_python_table_parser.py", line 94, in main
table_csv = get_table_csv_results(file_name)
File "/Users/santanna_santanna/PycharmProjects/KlooksExplore/PDFWork/textract_python_table_parser.py", line 53, in get_table_csv_results
response = client.analyze_document(Document={'Bytes': bytes_test}, FeatureTypes=['TABLES'])
File "/Users/santanna_santanna/anaconda3/lib/python3.6/site-packages/botocore/client.py", line 316, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/Users/santanna_santanna/anaconda3/lib/python3.6/site-packages/botocore/client.py", line 622, in _make_api_call
operation_model, request_dict, request_context)
File "/Users/santanna_santanna/anaconda3/lib/python3.6/site-packages/botocore/client.py", line 641, in _make_request
return self._endpoint.make_request(operation_model, request_dict)
File "/Users/santanna_santanna/anaconda3/lib/python3.6/site-packages/botocore/endpoint.py", line 102, in make_request
return self._send_request(request_dict, operation_model)
File "/Users/santanna_santanna/anaconda3/lib/python3.6/site-packages/botocore/endpoint.py", line 132, in _send_request
request = self.create_request(request_dict, operation_model)
File "/Users/santanna_santanna/anaconda3/lib/python3.6/site-packages/botocore/endpoint.py", line 116, in create_request
operation_name=operation_model.name)
File "/Users/santanna_santanna/anaconda3/lib/python3.6/site-packages/botocore/hooks.py", line 356, in emit
return self._emitter.emit(aliased_event_name, **kwargs)
File "/Users/santanna_santanna/anaconda3/lib/python3.6/site-packages/botocore/hooks.py", line 228, in emit
return self._emit(event_name, kwargs)
File "/Users/santanna_santanna/anaconda3/lib/python3.6/site-packages/botocore/hooks.py", line 211, in _emit
response = handler(**kwargs)
File "/Users/santanna_santanna/anaconda3/lib/python3.6/site-packages/botocore/signers.py", line 90, in handler
return self.sign(operation_name, request)
File "/Users/santanna_santanna/anaconda3/lib/python3.6/site-packages/botocore/signers.py", line 160, in sign
auth.add_auth(request)
File "/Users/santanna_santanna/anaconda3/lib/python3.6/site-packages/botocore/auth.py", line 357, in add_auth
raise NoCredentialsError
botocore.exceptions.NoCredentialsError: Unable to locate credentials
I'm aware I didn't pass any credentials and that's natural to happen but where should I pass it and what would be the right syntax for that using python os? Amazon's example doesn't say anything about that.
It depends where you run your code, for example:
local computer - can use aws configure CLI to set your credetnails
EC2 instance - use instance role
lambda function - use lambda execution role

PhpStorm Unknown exception encountered with possibly-broken third-party extension hg4ideapromptextension

I would like to know how to disable the third-party extension hg4ideapromptextension
I am using Xubuntu 17.10, Mercurial Distributed SCM (version 4.3.1), PhpStorm 10.0.4 and Python 2.7.14.
FYI, this was working fine until upgrade to Xubuntu 17.10
Here is the error I get
pushing to https://<user>#<my_redmine_server>
** Unknown exception encountered with possibly-broken third-party extension hg4ideapromptextension
** which supports versions unknown of Mercurial.
** Please disable hg4ideapromptextension and try your action again.
** If that fixes the bug please report it to the extension author.
** Python 2.7.14 (default, Sep 23 2017, 22:06:14) [GCC 7.2.0]
** Mercurial Distributed SCM (version 4.3.1)
** Extensions loaded: strip, mq, hg4ideapromptextension Traceback (most recent call last): File "/usr/bin/hg", line 45, in <module>
mercurial.dispatch.run() File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 81, in run
status = (dispatch(req) or 0) & 255 File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 162, in dispatch
ret = _runcatch(req) File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 302, in
_runcatch
return _callcatch(ui, _runcatchfunc) File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 310, in
_callcatch
return scmutil.callcatch(ui, func) File "/usr/lib/python2.7/dist-packages/mercurial/scmutil.py", line 150, in callcatch
return func() File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 292, in
_runcatchfunc
return _dispatch(req) File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 896, in
_dispatch
cmdpats, cmdoptions) File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 658, in runcommand
ret = _runcommand(ui, options, cmd, d) File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 904, in
_runcommand
return cmdfunc() File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 893, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **strcmdopt) File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 1079, in check
return func(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/mercurial/extensions.py", line 322, in closure
return func(*(args + a), **kw) File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 1079, in check
return func(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/hgext/mq.py", line 3542, in mqcommand
return orig(ui, repo, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 1079, in check
return func(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/mercurial/commands.py", line 4034, in push
other = hg.peer(repo, opts, dest) File "/usr/lib/python2.7/dist-packages/mercurial/hg.py", line 178, in peer
return _peerorrepo(rui, path, create).peer() File "/usr/lib/python2.7/dist-packages/mercurial/hg.py", line 153, in
_peerorrepo
obj = _peerlookup(path).instance(ui, path, create) File "/usr/lib/python2.7/dist-packages/mercurial/httppeer.py", line 391, in instance
inst._fetchcaps() File "/usr/lib/python2.7/dist-packages/mercurial/httppeer.py", line 123, in
_fetchcaps
self.caps = set(self._call('capabilities').split()) File "/usr/lib/python2.7/dist-packages/mercurial/httppeer.py", line 301, in
_call
fp = self._callstream(cmd, **args) File "/usr/lib/python2.7/dist-packages/mercurial/httppeer.py", line 230, in
_callstream
resp = self.urlopener.open(req) File "/usr/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response) File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs) File "/usr/lib/python2.7/urllib2.py", line 467, in error
result = self._call_chain(*args) File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args) File "/usr/lib/python2.7/urllib2.py", line 909, in http_error_401
url, req, headers) File "/usr/lib/python2.7/dist-packages/mercurial/url.py", line 405, in http_error_auth_reqed
self, auth_header, host, req, headers) File "/usr/lib/python2.7/urllib2.py", line 887, in http_error_auth_reqed
return self.retry_http_basic_auth(host, req, realm) File "/usr/lib/python2.7/dist-packages/mercurial/url.py", line 408, in retry_http_basic_auth
user, pw = self.passwd.find_user_password(realm, req.get_full_url()) File "/tmp/prompthooks2.py", line 208, in find_user_password
user, password = urllib2.HTTPPasswordMgrWithDefaultRealm.find_user_password(self, realm, authuri) TypeError: unbound method find_user_password() must be called with HTTPPasswordMgrWithDefaultRealm instance as first argument (got passwordmgr instance instead)
I have tried cloning the hg-prompt python script and adding the path to my ~/.hgrc as per https://bitbucket.org/sjl/hg-prompt/src
I still get the error:
$ hg prompt "test"
hg: unknown command 'prompt'
As an aside - I notice now that PhpStorm isn't prompting me for my hg repo password on push..
I also have tried disabling the extension in .hgrc
[extensions]
hgview = !
prompt = !
hg4ideapromptextension = !
still no luck
This was the response from Eugene Morozov (IntelliJ)
This is a bug that has already been fixed, but unfortunately the fix
won't be backported to v10.
https://youtrack.jetbrains.com/issue/IDEA-159546 Is there a chance you
could update?

ADL LRS saves statement but responds with HTTP 500

I've installed ADL LRS following README.txt on https://github.com/adlnet/ADL_LRS.
I'm testing it with TincanJS (https://github.com/RusticiSoftware/TinCanJS) with following code, statement gets saved but response code is 500.
lrs = new TinCan.LRS(
{
////// This works well
endpoint: "https://cloud.scorm.com/tc/public/",
username: "<Test User>",
password: "<Test Password>",
allowFail: false
////// This returns Internal Error(500)
endpoint: "my.server:8000/xapi/",
username: "<My User>",
password: "<My Password>",
allowFail: false
}
);
var statement = new TinCan.Statement(
{
actor: {
"name": "Ac Tor",
"account": {
"homePage": "http://act.or",
"name": "actor"
}
},
verb: {
id: "http://adlnet.gov/expapi/verbs/experienced"
},
target: {
id: "http://rusticisoftware.github.com/TinCanJS"
}
}
);
lrs.saveStatement(
statement,
{
callback: function (err, xhr) {
//...
}
}
);
Log at /ADL_LRS/../logs/lrs.log:
2017-03-15 10:33:31,248 [ERROR] lrs.views: 500 === /xapi/statements
Traceback (most recent call last):
File "/home/kursat/ADL_LRS/lrs/views.py", line 214, in handle_request
return processors[path][req_dict['method']](req_dict)
File "/home/kursat/ADL_LRS/lrs/utils/req_process.py", line 164, in statements_put
check_activity_metadata.delay(stmt_ids)
File "/home/kursat/env/local/lib/python2.7/site-packages/celery/app/task.py", line 453, in delay
return self.apply_async(args, kwargs)
File "/home/kursat/env/local/lib/python2.7/site-packages/celery/app/task.py", line 560, in apply_async
**dict(self._get_exec_options(), **options)
File "/home/kursat/env/local/lib/python2.7/site-packages/celery/app/base.py", line 354, in send_task
reply_to=reply_to or self.oid, **options
File "/home/kursat/env/local/lib/python2.7/site-packages/celery/app/amqp.py", line 305, in publish_task
**kwargs
File "/home/kursat/env/local/lib/python2.7/site-packages/kombu/messaging.py", line 172, in publish
routing_key, mandatory, immediate, exchange, declare)
File "/home/kursat/env/local/lib/python2.7/site-packages/kombu/connection.py", line 470, in _ensured
interval_max)
File "/home/kursat/env/local/lib/python2.7/site-packages/kombu/connection.py", line 382, in ensure_connection
interval_start, interval_step, interval_max, callback)
File "/home/kursat/env/local/lib/python2.7/site-packages/kombu/utils/__init__.py", line 246, in retry_over_time
return fun(*args, **kwargs)
File "/home/kursat/env/local/lib/python2.7/site-packages/kombu/connection.py", line 250, in connect
return self.connection
File "/home/kursat/env/local/lib/python2.7/site-packages/kombu/connection.py", line 756, in connection
self._connection = self._establish_connection()
File "/home/kursat/env/local/lib/python2.7/site-packages/kombu/connection.py", line 711, in _establish_connection
conn = self.transport.establish_connection()
File "/home/kursat/env/local/lib/python2.7/site-packages/kombu/transport/pyamqp.py", line 116, in establish_connection
conn = self.Connection(**opts)
File "/home/kursat/env/local/lib/python2.7/site-packages/amqp/connection.py", line 183, in __init__
return self._x_open(virtual_host)
File "/home/kursat/env/local/lib/python2.7/site-packages/amqp/connection.py", line 628, in _x_open
(10, 41), # Connection.open_ok
File "/home/kursat/env/local/lib/python2.7/site-packages/amqp/abstract_channel.py", line 67, in wait
self.channel_id, allowed_methods, timeout)
File "/home/kursat/env/local/lib/python2.7/site-packages/amqp/connection.py", line 241, in _wait_method
channel, method_sig, args, content = read_timeout(timeout)
File "/home/kursat/env/local/lib/python2.7/site-packages/amqp/connection.py", line 330, in read_timeout
return self.method_reader.read_method()
File "/home/kursat/env/local/lib/python2.7/site-packages/amqp/method_framing.py", line 189, in read_method
raise m
error: [Errno 104] Connection reset by peer
Thanks in advance.
There are log files in the log/ folder created during installation of the LRS. Inside there is an lrs.log file that will tell you what is causing the 500 error. I was able to send statements to a local LRS instance with no 500 error. Please respond back with the error so I can help. Thanks
Unless this is just a quirk of TinCanJS, I would think target should be object.

eb labs download not working in some AWS regions

I am new to dealing with the Parse-Server and hosting on AWS. But I have noticed that the "eb labs download" command in terminal works when my Parse Server environment is in N.Virginia but comes back with a whole list of errors when the the server environment was initially kept in Oregon. The errors are pertaining to "HTTP header errors". Anyone know why this is happening? Thanks in advance! Error is below:
Downloading application version...
Traceback (most recent call last):
File "/usr/local/bin/eb", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/ebcli/core/ebcore.py", line 150, in main
app.run()
File "/usr/local/lib/python2.7/site-packages/cement/core/foundation.py", line 797, in run
return_val = self.controller._dispatch()
File "/usr/local/lib/python2.7/site-packages/cement/core/controller.py", line 472, in _dispatch
return func()
File "/usr/local/lib/python2.7/site-packages/cement/core/controller.py", line 472, in _dispatch
return func()
File "/usr/local/lib/python2.7/site-packages/cement/core/controller.py", line 478, in _dispatch
return func()
File "/usr/local/lib/python2.7/site-packages/ebcli/core/abstractcontroller.py", line 57, in default
self.do_command()
File "/usr/local/lib/python2.7/site-packages/ebcli/labs/download.py", line 36, in do_command
download_source_bundle(app_name, env_name)
File "/usr/local/lib/python2.7/site-packages/ebcli/labs/download.py", line 49, in download_source_bundle
data = s3.get_object(bucket_name, key_name)
File "/usr/local/lib/python2.7/site-packages/ebcli/lib/s3.py", line 68, in get_object
Key=key)
File "/usr/local/lib/python2.7/site-packages/ebcli/lib/s3.py", line 34, in _make_api_call
return aws.make_api_call('s3', operation_name, **operation_options)
File "/usr/local/lib/python2.7/site-packages/ebcli/lib/aws.py", line 218, in make_api_call
response_data = operation(**operation_options)
File "/Users/Home/Library/Python/2.7/lib/python/site-packages/botocore/client.py", line 251, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/Users/Home/Library/Python/2.7/lib/python/site-packages/botocore/client.py", line 526, in _make_api_call
operation_model, request_dict)
File "/Users/Home/Library/Python/2.7/lib/python/site-packages/botocore/endpoint.py", line 141, in make_request
return self._send_request(request_dict, operation_model)
File "/Users/Home/Library/Python/2.7/lib/python/site-packages/botocore/endpoint.py", line 170, in _send_request
success_response, exception):
File "/Users/Home/Library/Python/2.7/lib/python/site-packages/botocore/endpoint.py", line 249, in _needs_retry
caught_exception=caught_exception, request_dict=request_dict)
File "/Users/Home/Library/Python/2.7/lib/python/site-packages/botocore/hooks.py", line 227, in emit
return self._emit(event_name, kwargs)
File "/Users/Home/Library/Python/2.7/lib/python/site-packages/botocore/hooks.py", line 210, in _emit
response = handler(**kwargs)
File "/Users/Home/Library/Python/2.7/lib/python/site-packages/botocore/utils.py", line 868, in redirect_from_error
new_region = self.get_bucket_region(bucket, response)
File "/Users/Home/Library/Python/2.7/lib/python/site-packages/botocore/utils.py", line 913, in get_bucket_region
response_headers = service_response['ResponseMetadata']['HTTPHeaders']
KeyError: 'HTTPHeaders'
Generally the EB CLI works in a single region at a time. If you have a specific region in which you want to use you can specify it using the --region flag.
eb labs download --region us-west-2
Otherwise it is usually best practice to keep your AWS stack resources in a single region.

python-selenium on aws lambda throws error when switch_back_to.default_content and try to select element

python-selenium using phantomjs used to open an iFrame inside the page, then after switching back to the default content(driver.switch_to.default_content()) does not work.
The following is a pseudo code snippet to explain the scenario.
frame = WebDriverWait(driver, wait_time).until(EC.frame_to_be_available_and_switch_to_it((By.CSS_SELECTOR, "iframe.class_name")))
......
driver.switch_to.default_content()
print('Switched back to default content')
# Error occurs when line below is interpreted
driver.find_element_by_css_selector("div[title^='Test %s']" %(array_of_content[1]))
Following error occurs:-
Traceback (most recent call last):
File "/var/task/main.py", line 217, in test_method
driver.find_element_by_css_selector("div[title^='Test %s']" %(array_of_content[1]))
File "/var/task/selenium/webdriver/support/wait.py", line 71, in until
value = method(self._driver)
File "/var/task/selenium/webdriver/support/expected_conditions.py", line 213, in __call__
element = visibility_of_element_located(self.locator)(driver)
File "/var/task/selenium/webdriver/support/expected_conditions.py", line 78, in __call__
return _element_if_visible(_find_element(driver, self.locator))
File "/var/task/selenium/webdriver/support/expected_conditions.py", line 307, in _find_element
return driver.find_element(*by)
File "/var/task/selenium/webdriver/remote/webdriver.py", line 752, in find_element
'value': value})['value']
File "/var/task/selenium/webdriver/remote/webdriver.py", line 234, in execute
response = self.command_executor.execute(driver_command, params)
File "/var/task/selenium/webdriver/remote/remote_connection.py", line 401, in execute
return self._request(command_info[0], url, body=data)
File "/var/task/selenium/webdriver/remote/remote_connection.py", line 471, in _request
resp = opener.open(request, timeout=self._timeout)
File "/usr/lib64/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/usr/lib64/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/lib64/python2.7/urllib2.py", line 1229, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib64/python2.7/urllib2.py", line 1202, in do_open
r = h.getresponse(buffering=True)
File "/var/task/raven/breadcrumbs.py", line 328, in getresponse
rv = real_getresponse(self, *args, **kwargs)
File "/usr/lib64/python2.7/httplib.py", line 1132, in getresponse
response.begin()
File "/usr/lib64/python2.7/httplib.py", line 453, in begin
version, status, reason = self._read_status()
File "/usr/lib64/python2.7/httplib.py", line 417, in _read_status
raise BadStatusLine(line)
BadStatusLine: ''
Any ideas, what is happening.
As I am able to see the same error, even if I write driver.save_screenshot('test.png').
But it is not throwing any error on local machines, also tried to use AMI instance to replicate if something is there in concern Amazon Linux.