Project

General

Profile

Bug #36368

cephfs/tool: cephfs-shell have "no attribute 'decode'" err

Added by huanwen ren 2 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
-
Target version:
Start date:
Due date:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
cephfs-shell
Labels (FS):
Pull request ID:

Description

cephfs-shell have "no attribute 'decode'" err, as follow:

[root@star /]# python3 cephfs-shell
CephFS:~/>>> ls
'str' object has no attribute 'decode'
Traceback (most recent call last):
  File "cephfs-shell", line 367, in onecmd
    res = Cmd.onecmd(self, line)
  File "/usr/lib/python3.4/site-packages/cmd2/cmd2.py", line 2050, in onecmd
    stop = func(statement)
  File "/usr/lib/python3.4/site-packages/cmd2/cmd2.py", line 241, in cmd_wrapper
    return func(instance, args)
  File "cephfs-shell", line 571, in do_ls
    items = [i for i in items if not i.d_name.decode(
  File "cephfs-shell", line 571, in <listcomp>
    items = [i for i in items if not i.d_name.decode(
AttributeError: 'str' object has no attribute 'decode'

History

#1 Updated by huanwen ren 2 months ago

Other Place

[root@star /]# python3 cephfs-shell
CephFS:~/>>> ls
'str' object has no attribute 'decode'
Traceback (most recent call last):
  File "cephfs-shell", line 367, in onecmd
    res = Cmd.onecmd(self, line)
  File "/usr/lib/python3.4/site-packages/cmd2/cmd2.py", line 2050, in onecmd
    stop = func(statement)
  File "/usr/lib/python3.4/site-packages/cmd2/cmd2.py", line 241, in cmd_wrapper
    return func(instance, args)
  File "cephfs-shell", line 581, in do_ls
    path = item.d_name.decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'

#2 Updated by John Spray 2 months ago

  • Project changed from Ceph to fs

#3 Updated by Patrick Donnelly 2 months ago

  • Status changed from New to Need Review
  • Assignee set to huanwen ren
  • Priority changed from Normal to High
  • Target version set to v14.0.0
  • Start date deleted (10/10/2018)
  • Source set to Community (dev)
  • Affected Versions deleted (v14.0.0)
  • Component(FS) cephfs-shell added

#4 Updated by Patrick Donnelly about 2 months ago

  • Status changed from Need Review to Resolved

Also available in: Atom PDF