Project

General

Profile

Bug #39060

ls -S command produces AttributeError: 'str' object has no attribute 'decode'

Added by Varsha Rao 7 months ago. Updated 7 months ago.

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

0%

Source:
Development
Tags:
Backport:
nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
cephfs-shell
Labels (FS):
task(easy), task(intern)
Pull request ID:
Crash signature:

Description

CephFS:~/>>> ls -S
Traceback (most recent call last):
  File "./../src/tools/cephfs/cephfs-shell", line 367, in onecmd
    res = Cmd.onecmd(self, line)
  File "/usr/local/lib/python3.7/site-packages/cmd2-0.9.11-py3.7.egg/cmd2/cmd2.py", line 1992, in onecmd
    stop = func(statement)
  File "/usr/local/lib/python3.7/site-packages/cmd2-0.9.11-py3.7.egg/cmd2/cmd2.py", line 252, in cmd_wrapper
    return func(cmd2_instance, args)
  File "./../src/tools/cephfs/cephfs-shell", line 574, in do_ls
    items = sorted(items, key=lambda item: cephfs.stat(
  File "./../src/tools/cephfs/cephfs-shell", line 575, in <lambda>
    to_bytes(dir_name + '/' + item.d_name.decode('utf-8'))).st_size)

AttributeError: 'str' object has no attribute 'decode'

Python Version: Python 3.7.2


Related issues

Copied to fs - Backport #39260: nautilus: ls -S command produces AttributeError: 'str' object has no attribute 'decode' Resolved

History

#1 Updated by Patrick Donnelly 7 months ago

  • Assignee set to Varsha Rao
  • Target version set to v15.0.0
  • Start date deleted (04/01/2019)
  • Source set to Development
  • Labels (FS) task(easy), task(intern) added

#2 Updated by Patrick Donnelly 7 months ago

  • Status changed from New to Need Review
  • Pull request ID set to 27345

#3 Updated by Patrick Donnelly 7 months ago

  • Backport set to nautilus

#4 Updated by Patrick Donnelly 7 months ago

  • Status changed from Need Review to Pending Backport

#5 Updated by Nathan Cutler 7 months ago

  • Copied to Backport #39260: nautilus: ls -S command produces AttributeError: 'str' object has no attribute 'decode' added

#6 Updated by Nathan Cutler 7 months ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF