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

AttributeError #22

Closed
gantsevdenis opened this issue Apr 23, 2021 · 2 comments
Closed

AttributeError #22

gantsevdenis opened this issue Apr 23, 2021 · 2 comments

Comments

@gantsevdenis
Copy link

Is the project still maintained? ..
The following error happens in Tumbleweed
I have raised the issue to rpm, but they redirected me here (rpm-software-management/rpm#1651)

denis@localhost:~/sources/rpm> cnf blabla
 blabla: command not found

denis@localhost:~/sources/rpm> cnf useradd
useradd: searching ... Traceback (most recent call last):
  File "/usr/bin/cnf", line 132, in <module>
    main()
  File "/usr/bin/cnf", line 99, in main
    pkg = find_package_by_file(path + '/' + term)
  File "/usr/bin/cnf", line 82, in find_package_by_file
    return next(mi)['name'].decode()
AttributeError: 'str' object has no attribute 'decode'

denis@localhost:~/sources/rpm> zypper info command-not-found
Loading repository data...
Reading installed packages...


Information for package command-not-found:
------------------------------------------
Repository     : openSUSE-Tumbleweed-Oss
Name           : command-not-found
Version        : 0.2.4+20210325.6c2d9f3-1.1
Arch           : noarch
Vendor         : openSUSE
Installed Size : 119.3 KiB
Installed      : Yes (automatically)
Status         : up-to-date
Source package : scout-0.2.4+20210325.6c2d9f3-1.1.src
Summary        : Command Not Found extension for shell

denis@localhost:~/sources/rpm> zypper info rpm
Loading repository data...
Reading installed packages...

Information for package rpm:
----------------------------
Repository     : openSUSE-Tumbleweed-Oss
Name           : rpm
Version        : 4.16.1.3-1.2
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 2.7 MiB
Installed      : Yes
Status         : up-to-date
Source package : rpm-4.16.1.3-1.2.src

According to rpm contributor,

It's a cnf issue, it assumes python bindings return header data as binary but since rpm >= 4.15 string data is returned as native Python strings

@bmwiedemann
Copy link
Member

My Tumbleweed machines got rpm-4.15.1 on 2020-01-12
Has this been broken for 15 months?

I now submitted a fix to git and will push it into Tumbleweed.

@bmwiedemann
Copy link
Member

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

2 participants