Skip to content

download Chinese name file KeyError #182

Description

@mayitbe65
Traceback (most recent call last):
  File "test2.py", line 56, in <module>
    self.client.download("/user/sample/report_file/group1/M00/00/D3/上线测试_1638327036000.zip", "222333.zip", overwrite=True)
  File "/home/jesse/workspace/py2env/lib/python2.7/site-packages/hdfs/client.py", line 786, in download
    remote_paths = list(self.walk(hdfs_path, depth=0, status=False))
  File "/home/jesse/workspace/py2env/lib/python2.7/site-packages/hdfs/client.py", line 1154, in walk
    s = self.status(hdfs_path)
  File "/home/jesse/workspace/py2env/lib/python2.7/site-packages/hdfs/client.py", line 318, in status
    res = self._get_file_status(hdfs_path, strict=strict)
  File "/home/jesse/workspace/py2env/lib/python2.7/site-packages/hdfs/client.py", line 97, in api_handler

▽
    quote(client.resolve(hdfs_path), '/= '),
  File "/opt/python-2.7.14/lib/python2.7/urllib.py", line 1298, in quote
    return ''.join(map(quoter, s))
KeyError: u'\u4e0a'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions