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

elementtree.getchildren function is removed in Python 3.9 #1162

Closed
uzrbin opened this issue Dec 10, 2020 · 4 comments
Closed

elementtree.getchildren function is removed in Python 3.9 #1162

uzrbin opened this issue Dec 10, 2020 · 4 comments

Comments

@uzrbin
Copy link

uzrbin commented Dec 10, 2020

getchildren()

Deprecated since version 3.2, will be removed in version 3.9: Use list(elem) or iteration.

https://docs.python.org/3.8/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.getchildren

~>s3cmd sync s3://xxx/yyy/ yyy/

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    An unexpected error has occurred.
  Please try reproducing the error using
  the latest s3cmd code from the git master
  branch found at:
    https://github.com/s3tools/s3cmd
  and have a look at the known issues list:
    https://github.com/s3tools/s3cmd/wiki/Common-known-issues-and-their-solutions
  If the error persists, please report the
  following lines (removing any private
  info as necessary) to:
   s3tools-bugs@lists.sourceforge.net


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Invoked as: /usr/bin/s3cmd sync s3://xxx/yyy/ yyy/
Problem: <class 'AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'getchildren'
S3cmd:   2.1.0
python:   3.9.0 (default, Oct  7 2020, 23:09:01) 
[GCC 10.2.0]
environment LANG=en_CA.UTF-8

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 1900, in cmd_sync
    return cmd_sync_remote2local(args)
  File "/usr/bin/s3cmd", line 1203, in cmd_sync_remote2local
    remote_list, src_exclude_list, remote_total_size = fetch_remote_list(fetch_source_args, 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'

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    An unexpected error has occurred.
  Please try reproducing the error using
  the latest s3cmd code from the git master
  branch found at:
    https://github.com/s3tools/s3cmd
  and have a look at the known issues list:
    https://github.com/s3tools/s3cmd/wiki/Common-known-issues-and-their-solutions
  If the error persists, please report the
  above lines (removing any private
  info as necessary) to:
   s3tools-bugs@lists.sourceforge.net
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

@k0ste
Copy link
Contributor

k0ste commented Dec 11, 2020

This was fixed in #1137.

@uzrbin uzrbin closed this as completed Dec 11, 2020
@uzrbin uzrbin reopened this Dec 11, 2020
@uzrbin
Copy link
Author

uzrbin commented Dec 11, 2020

Sorry, missed that. Is there a release scheduled for this now that python 3.9 is released? I can run off master but some distros will be breaking now.

@k0ste
Copy link
Contributor

k0ste commented Dec 11, 2020

Recently I was created #1164 to attract attention of maintainers.

@uzrbin uzrbin closed this as completed Dec 11, 2020
@fviard
Copy link
Contributor

fviard commented Dec 11, 2020 via email

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

3 participants