-
-
Notifications
You must be signed in to change notification settings - Fork 910
python 3.9: AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'getchildren' #1157
Copy link
Copy link
Closed
Description
When doing an s3cmd sync --delete-removed --follow-symlinks -P somedir/. s3://somebucket/somedir/
Traceback (most recent call last):
File "/usr/bin/s3cmd", line 3121, in <module>
rc = main()
File "/usr/bin/s3cmd", line 3030, in main
rc = cmd_func(args)
File "/usr/bin/s3cmd", line 1898, in cmd_sync
return cmd_sync_local2remote(args)
File "/usr/bin/s3cmd", line 1871, in cmd_sync_local2remote
ret = _single_process(args[:-1])
File "/usr/bin/s3cmd", line 1625, in _single_process
return _child(destination_base, source_args)
File "/usr/bin/s3cmd", line 1729, in _child
remote_list, dst_exclude_list, remote_total_size = fetch_remote_list(destbase_with_source_list, recursive = True, require_attribs = True)
File "/usr/lib/python3.9/site-packages/S3/FileLists.py", line 471, in fetch_remote_list
objectlist, tmp_total_size = _get_filelist_remote(uri, recursive = True)
File "/usr/lib/python3.9/site-packages/S3/FileLists.py", line 407, in _get_filelist_remote
response = s3.bucket_list(remote_uri.bucket(), prefix = remote_uri.object(),
File "/usr/lib/python3.9/site-packages/S3/S3.py", line 321, in bucket_list
for truncated, dirs, objects in self.bucket_list_streaming(bucket, prefix, recursive, uri_params, limit):
File "/usr/lib/python3.9/site-packages/S3/S3.py", line 356, in bucket_list_streaming
current_list = _get_contents(response["data"])
File "/usr/lib/python3.9/site-packages/S3/S3.py", line 339, in _get_contents
return getListFromXml(data, "Contents")
File "/usr/lib/python3.9/site-packages/S3/Utils.py", line 120, in getListFromXml
return parseNodes(nodes)
File "/usr/lib/python3.9/site-packages/S3/Utils.py", line 67, in parseNodes
for child in node.getchildren():
AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'getchildren'
Similar to issues reported on other projects:
ocrmypdf/OCRmyPDF#583
openmm/openmm#2887
It looks like for child in node.getchildren(): should just be for child in node:?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels