question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

('Connection broken: OSError("(104, \'ECONNRESET\')",)', OSError("(104, 'ECONNRESET')",))

See original GitHub issue

Please answer these questions before submitting your issue. Thanks!

What version of Python are you using (python -V)?

Python 3.6.4 :: Anaconda, Inc.

What operating system and processor architecture are you using (python -c 'import platform; print(platform.uname());')?

uname_result(system='Linux', node='XXXXXXXXX.ip-XXX-XXX-XXX.net', release='3.10.23-xxxx-std-ipv6-64', version='#1 SMP Tue Mar 18 14:48:24 CET 2014', machine='x86_64', processor='')

Which Python packages do you have installed (run the pip freeze or pip3 freeze command and paste output)?

alabaster==0.7.10
anaconda-client==1.6.9
anaconda-navigator==1.7.0
anaconda-project==0.8.2
arlo==1.0.10
asn1crypto==0.24.0
astroid==1.6.1
astropy==2.0.3
attrs==17.4.0
Babel==2.5.3
backports.shutil-get-terminal-size==1.0.0
beautifulsoup4==4.6.0
bitarray==0.8.1
bkcharts==0.2
blaze==0.11.3
bleach==2.1.2
bokeh==0.12.13
boto==2.48.0
Bottleneck==1.2.1
certifi==2018.1.18
cffi==1.11.4
chardet==3.0.4
click==6.7
cloudpickle==0.5.2
clyent==1.2.2
colorama==0.3.9
conda==4.4.10
conda-build==3.4.1
conda-verify==2.0.0
contextlib2==0.5.5
cryptography==2.1.4
cycler==0.10.0
Cython==0.27.3
cytoolz==0.9.0
dask==0.16.1
datashape==0.5.4
decorator==4.2.1
distributed==1.20.2
docutils==0.14
entrypoints==0.2.3
et-xmlfile==1.0.1
fastcache==1.0.2
filelock==2.0.13
Flask==0.12.2
Flask-Cors==3.0.3
gevent==1.2.2
glob2==0.6
gmpy2==2.0.8
greenlet==0.4.12
h5py==2.7.1
heapdict==1.0.0
html5lib==1.0.1
idna==2.6
imageio==2.2.0
imagesize==0.7.1
ipykernel==4.8.0
ipython==6.2.1
ipython-genutils==0.2.0
ipywidgets==7.1.1
isort==4.2.15
itsdangerous==0.24
jdcal==1.3
jedi==0.11.1
Jinja2==2.10
jsonschema==2.6.0
jupyter==1.0.0
jupyter-client==5.2.2
jupyter-console==5.2.0
jupyter-core==4.4.0
jupyterlab==0.31.5
jupyterlab-launcher==0.10.2
lazy-object-proxy==1.3.1
llvmlite==0.21.0
locket==0.2.0
lxml==4.1.1
MarkupSafe==1.0
matplotlib==2.1.2
mccabe==0.6.1
mistune==0.8.3
monotonic==1.4
mpmath==1.0.0
msgpack-python==0.5.1
multipledispatch==0.4.9
navigator-updater==0.1.0
nbconvert==5.3.1
nbformat==4.4.0
networkx==2.1
nltk==3.2.5
nose==1.3.7
notebook==5.4.0
numba==0.36.2
numexpr==2.6.4
numpy==1.14.0
numpydoc==0.7.0
odo==0.5.1
olefile==0.45.1
openpyxl==2.4.10
packaging==16.8
pandas==0.22.0
pandocfilters==1.4.2
parso==0.1.1
partd==0.3.8
path.py==10.5
pathlib2==2.3.0
patsy==0.5.0
pep8==1.7.1
pexpect==4.3.1
pickleshare==0.7.4
Pillow==5.0.0
pkginfo==1.4.1
pluggy==0.6.0
ply==3.10
prompt-toolkit==1.0.15
psutil==5.4.3
ptyprocess==0.5.2
py==1.5.2
pycodestyle==2.3.1
pycosat==0.6.3
pycparser==2.18
pycrypto==2.6.1
pycurl==7.43.0.1
pyflakes==1.6.0
Pygments==2.2.0
pylint==1.8.2
pyodbc==4.0.22
pyOpenSSL==17.5.0
pyparsing==2.2.0
PySocks==1.6.7
pytest==3.3.2
python-dateutil==2.6.1
pytz==2017.3
PyWavelets==0.5.2
PyYAML==3.12
pyzmq==16.0.3
QtAwesome==0.4.4
qtconsole==4.3.1
QtPy==1.3.1
requests==2.18.4
rope==0.10.7
ruamel-yaml==0.15.35
scikit-image==0.13.1
scikit-learn==0.19.1
scipy==1.0.0
seaborn==0.8.1
Send2Trash==1.4.2
simplegeneric==0.8.1
singledispatch==3.4.0.3
six==1.11.0
snowballstemmer==1.2.1
sortedcollections==0.5.3
sortedcontainers==1.5.9
speedtest-cli==2.0.2
Sphinx==1.6.6
sphinxcontrib-websupport==1.0.1
spyder==3.2.6
SQLAlchemy==1.2.1
sseclient==0.0.19
statsmodels==0.8.0
sympy==1.1.1
tables==3.4.2
tblib==1.3.2
terminado==0.8.1
testpath==0.3.1
toolz==0.9.0
tornado==4.5.3
traitlets==4.3.2
typing==3.6.2
unicodecsv==0.14.1
urllib3==1.22
wcwidth==0.1.7
webencodings==0.5.1
Werkzeug==0.14.1
widgetsnbextension==3.1.0
wrapt==1.10.11
xlrd==1.1.0
XlsxWriter==1.0.2
xlwt==1.3.0
zict==0.1.3

Which Arlo hardware do you have (camera types - [Arlo, Pro, Q, etc.], basestation model, etc.)?

Arlo Q

What did you do?

from datetime import timedelta, date
from Arlo import Arlo
import datetime
import sys
import os

USERNAME = 'XXXXXXX'
PASSWORD = 'XXXXXXX'

def createFolder(directory):
    try:
        if not os.path.exists(directory):
            os.makedirs(directory)
    except OSError:
        print ('Error: Creating directory. ' +  directory) 

# Create folders for the previous 7 days preceeding today
folder_yesterday = (date.today()-timedelta(days=1)).strftime("%Y-%m-%d")
createFolder('/home/arlo/arlo/library/' + folder_yesterday + '/')

try:
	# Instantiating the Arlo object automatically calls Login(), which returns an oAuth token that gets cached.
	# Subsequent successful calls to login will update the oAuth token.
	arlo = Arlo(USERNAME, PASSWORD)
	# At this point you're logged into Arlo.
    
	# Specify dates for the previous 7 days preceeding today in correct format
	download_yesterday = (date.today()-timedelta(days=1)).strftime("%Y%m%d")

	# Get all of the recordings for specific day.
	library_yesterday = arlo.GetLibrary(download_yesterday, download_yesterday)

	# Iterate through the recordings in the library_yesterday.
	for recording in library_yesterday:

		videofilename = datetime.datetime.fromtimestamp(int(recording['name'])//1000).strftime('%Y-%m-%d-%H-%M-%S') + '-' + recording['uniqueId'] + '.mp4'
		
		# Get video as a chunked stream; this function returns a generator.
		stream = arlo.StreamRecording(recording['presignedContentUrl'])
		with open('/home/arlo/arlo/library/'+ folder_yesterday + '/' + videofilename, 'wb') as f:
			for chunk in stream:
				f.write(chunk)
			f.close()

		print('Downloaded video '+videofilename+' from '+recording['createdDate']+'.')

	# Delete all of the videos you just downloaded from the Arlo library.
	result = arlo.BatchDeleteRecordings(library_yesterday)

	# If we made it here without an exception, then the videos were successfully deleted.
	print('Batch deletion of videos for DATE' + folder_yesterday + 'completed successfully.')

	arlo.Logout()
	print('Logged out')

	# Rename files with replacing arlo device unique ID with its name

	path_yesterday =  '/home/arlo/arlo/library/' + folder_yesterday

	filenames_yesterday = os.listdir(path_yesterday)

	for filename in filenames_yesterday:
		os.rename(path_yesterday + '/' + filename, path_yesterday + '/' + filename.replace("300-52XXXXX_4CD365ST1B5C8", "baby-crib"))

	filenames_yesterday = os.listdir(path_yesterday)
    
	for filename in filenames_yesterday:
		os.rename(path_yesterday + '/' + filename, path_yesterday + '/' + filename.replace("300-52XXXXX_4CD365S91B43C", "play-yard"))

	print('All arlo video files renamed successfully.')

except Exception as e:
    print(e)

I had this script running for about half a year successfully every day downloading all the videos from both of my Arlo A cameras from the previous day. About 5 days ago, it stopped working. When manually trying to run this after about 15 successful video downloads I get the following error: (‘Connection broken: OSError(“(104, 'ECONNRESET')”,)’, OSError(“(104, ‘ECONNRESET’)”,))

What did you expect to see?

I expected it to work as usually, downloading all the videos from the previous day.

What did you see instead?

(‘Connection broken: OSError(“(104, 'ECONNRESET')”,)’, OSError(“(104, ‘ECONNRESET’)”,))

Does this issue reproduce with the latest release?

Yes

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
prakash-patelcommented, Oct 8, 2018

After running basic download script from example you have, I see it’s loading all the videos works fine for me. In library loop i try to push every video to google drive, issue i am having is keeping my google drive connection open for longer time.

I will have to research little on my side to see why it’s fail after certain videos uploading to google drive.

0reactions
jeffreydwaltercommented, Nov 6, 2018

@stantyan thanks for the info! It’s very possible Netgear has implemented some sort of rate limiting. Unfortunately, I don’t have that much video data, so it’s hard for me to test this scenario. I’m going to close this. If you have any additional insight, please feel free to comment here or open a new issue.

Thanks again!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Connection aborted, 'ECONNRESET', 104 - Websocket
ECONNRESET is a generic connection protocol error that is bound to happen eventually when using the REST or Streaming API (websocket).
Read more >
Python3 Requests ConnectionError: ('Connection aborted ...
', OSError("(104, 'ECONNRESET')",)) with a specific URL - Stack Overflow. Stack Overflow for Teams – Start collaborating and sharing organizational knowledge.
Read more >
Python 'ECONNRESET', ChunkedEncodingError and ...
The main problem is that it seems to take Twitter a long time to admin the failed connection, and I keep getting 'TooManyConnections'...
Read more >
Getting SSLError "bad handshake: SysCallError (104 ... - IBM
Getting SSLError "bad handshake: SysCallError (104, ECONNRESET)" while doing the python requests from the docker container.
Read more >
'Connection aborted.', OSError("(104, 'ECONNRESET')"
We are getting zendesk data via api with zdesk. Recently we are getting this connection error frequently: 'Connection aborted.',...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found