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

413 Client Error: Request Entity Too Large for url: https://myapi.arlo.com/hmsweb/users/library/recycle #186

Open
jgiambona opened this issue Feb 17, 2022 · 2 comments

Comments

@jgiambona
Copy link

Please answer these questions before submitting your issue. Thanks!

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

Python 3.9.10

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

uname_result(system='Linux', node='fedora', release='5.16.8-100.fc34.x86_64', version='#1 SMP PREEMPT Tue Feb 8 20:59:13 UTC 2022', machine='x86_64')

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

argcomplete==1.12.0
arlo==1.2.57
awscli==1.19.100
Babel==2.9.1
bcrypt==3.1.7
Beaker==1.10.0
beautifulsoup4==4.9.3
blivet==3.3.3
blivet-gui==2.3.0
botocore==1.20.100
Brlapi==0.8.2
cached-property==1.5.2
cachetools==4.2.4
certifi==2020.12.5
cffi==1.14.5
chardet==4.0.0
chrome-gnome-shell==0.0.0
colorama==0.4.4
colorlog==4.7.2
configobj==5.0.6
cryptography==3.4.6
cupshelpers==1.0
cycler==0.10.0
Cython==0.29.21
dasbus==1.4
dbus-python==1.2.18
decorator==4.4.2
defusedxml==0.7.0rc2
distro==1.5.0
docutils==0.16
fastcache==1.1.0
fros==1.1
gmpy2==2.1.0b6
google-api-core==2.3.2
google-api-python-client==2.33.0
google-auth==2.3.3
google-auth-httplib2==0.1.0
google-auth-oauthlib==0.4.6
googleapis-common-protos==1.54.0
gpg==1.15.1
gpodder==3.10.21
gssapi==1.6.9
httplib2==0.20.2
humanize==0.5.1
idna==2.10
ifaddr==0.1.7
jeepney==0.6.0
Jinja2==2.11.3
jmespath==0.10.0
keyring==21.8.0
kiwisolver==1.3.2
koji==1.27.1
langtable==0.0.56
libcomps==0.1.18
lxml==4.6.5
Mako==1.1.4.dev0
MarkupSafe==1.1.1
matplotlib==3.4.3
monotonic==1.6
mpmath==1.2.1
msgpack==1.0.2
mygpoclient==1.8
nftables==0.1
numexpr==2.7.1
numpy==1.20.1
numpy-stl==2.11.2
oauthlib==3.1.1
olefile==0.46
openshot-qt==2.6.1.dev0
packaging==20.9
Paste==3.5.0
perf==0.1
pexpect==4.8.0
pickle-mixin==1.0.2
pid==2.2.3
Pillow==8.1.2
ply==3.11
podcastparser==0.6.6
productmd==1.33
progressbar2==3.52.1
protobuf==3.19.1
proton-client==0.7.1
protonvpn-cli==3.11.0
protonvpn-gui==1.7.0
protonvpn-nm-lib==3.7.0
psutil==5.8.0
ptyprocess==0.6.0
pwquality==1.4.4
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycairo==1.20.1
pycollada==0.7.1
pycparser==2.20
pycrypto==2.6.1
pycups==2.0.1
pycurl==7.43.0.6
pyenchant==3.2.1
pygit2==1.5.0
pyglet==1.5.11
PyGObject==3.40.1
pygpu==0.7.6
pykickstart==3.32
pyOpenSSL==21.0.0
pyparsing==2.4.7
pyparted==3.11.7
PyQt5==5.15.0
PyQt5-sip==4.19.24
pyserial==3.4
PySide2==5.15.2
PySocks==1.7.1
python-augeas==0.5.0
python-dateutil==2.8.1
python-gnupg==0.4.8
python-linux-procfs==0.6.3
python-meh==0.50
python-utils==2.4.0
pythondialog==3.5.1
pytz==2021.3
pyudev==0.22.0
pyxdg==0.27
PyYAML==5.4.1
pyzmq==22.0.3
regex==2022.1.18
requests==2.25.1
requests-file==1.5.1
requests-ftp==0.3.1
requests-gssapi==1.2.3
requests-oauthlib==1.3.0
rpm==4.16.1.3
rpmautospec==0.2.5
rsa==4.8
Rtree==0.9.4
s3transfer==0.4.2
scipy==1.6.2
SecretStorage==3.3.1
selinux==3.2
sepolicy==3.2
setools==4.4.0
Shapely==1.7.1
shiboken2==5.15.2
simpleaudio==1.0.4
simpleline==1.8
six==1.15.0
slip==0.6.4
slip.dbus==0.6.4
sos==4.1
soupsieve==2.2
sseclient==0.0.22
svg.path==4.1
sympy==1.8
systemd-python==234
Tempita==0.5.1
Theano-PyMC==1.0.13
torbrowser-launcher==0.3.5
trimesh==3.8.17
uritemplate==4.1.1
urllib3==1.24
youtube-dl==2021.12.17
zeroconf==0.30.0

Which version of ffmpeg are you using (ffmpeg -version)?

ffmpeg version 4.4.1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11 (GCC)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags=' -I/usr/include/rav1e' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librav1e --enable-libsmbclient --enable-version3 --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-vapoursynth --enable-libvpx --enable-vulkan --enable-libglslang --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxml2 --enable-libzimg --enable-libzvbi --enable-lv2 --enable-avfilter --enable-avresample --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-lto --enable-libmfx --enable-runtime-cpudetect
libavutil      56. 70.100 / 56. 70.100
libavcodec     58.134.100 / 58.134.100
libavformat    58. 76.100 / 58. 76.100
libavdevice    58. 13.100 / 58. 13.100
libavfilter     7.110.100 /  7.110.100
libavresample   4.  0.  0 /  4.  0.  0
libswscale      5.  9.100 /  5.  9.100
libswresample   3.  9.100 /  3.  9.100
libpostproc    55.  9.100 / 55.  9.100

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

Arlo 3

What did you do?

If possible, provide the steps you took to reproduce the issue.
A complete runnable program is good. (don't include your user/password or any sensitive info)

from arlo import Arlo

from datetime import timedelta, date
import datetime
import sys

USERNAME = 'USERNAME_HERE'
PASSWORD = 'PASSWORD_HERE'
# For Arlo Gmail MFA auth
GMAILCREDS = 'gmail.credentials' 

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, GMAILCREDS)
	# At this point you're logged into Arlo.

	today = (date.today()-timedelta(days=0)).strftime("%Y%m%d")
	startdate = (date.today()-timedelta(days=30)).strftime("%Y%m%d")

	# Get all of the recordings for a date range.
	library = arlo.GetLibrary(startdate, today)

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

		videofilename = datetime.datetime.fromtimestamp(int(recording['name'])//1000).strftime('%Y-%m-%d %H-%M-%S') + ' ' + recording['uniqueId'] + '.mp4'
		##
		# The videos produced by Arlo are pretty small, even in their longest, best quality settings,
		# but you should probably prefer the chunked stream (see below). 
		###    
		#    # Download the whole video into memory as a single chunk.
		#    video = arlo.GetRecording(recording['presignedContentUrl'])
		#	 with open('videos/'+videofilename, 'wb') as f:
		#        f.write(video)
		#        f.close()
		# Or:
		#
		# Get video as a chunked stream; this function returns a generator.
		stream = arlo.StreamRecording(recording['presignedContentUrl'])
		with open('videos/'+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.
	# Notice that you can pass the "library" object we got back from the GetLibrary() call.
	result = arlo.BatchDeleteRecordings(library)

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

except Exception as e:
    print(e)

What did you expect to see?

Was working previously. I checked and there is no recycle/trash area in my.arlo.com and have also even previously tried deleting all videos in the account

What did you see instead?

413 Client Error: Request Entity Too Large for url: https://myapi.arlo.com/hmsweb/users/library/recycle

Does this issue reproduce with the latest release?

Yes

@stale
Copy link

stale bot commented Apr 19, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Apr 19, 2022
@jgiambona
Copy link
Author

Tried running it again, it started downloading videos as it did last time, but the error message is different:

520 Server Error: for url: https://myapi.arlo.com/hmsweb/users/library/recycle

@stale stale bot removed the stale label Apr 19, 2022
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