AttributeError: 'Magic' object has no attribute 'cookie'

Bug #1949253 reported by Juerg Haefliger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-magic (Ubuntu)
New
Undecided
Unassigned

Bug Description

$ python3 -c "import magic; magic.Magic(foo=None)"
Exception ignored in: <function Magic.__del__ at 0x7fe52d0bb1f0>
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/magic/__init__.py", line 155, in __del__
    if self.cookie and magic_close:
AttributeError: 'Magic' object has no attribute 'cookie'
        <a href="https://autopkgtest.ubuntu.com/results/autopkgtest-bionic/bionic/arm64/a/asic0x/20211020_225010_417e7@/log.gz">log</a> &emsp;
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: __init__() got an unexpected keyword argument 'foo'

This is fixed in upstream https://github.com/ahupp/python-magic/commit/e6d7ee03c6935c54a83fa450607e57db04ec2bbe

ProblemType: Bug
DistroRelease: Ubuntu 21.04
Package: python3-magic 2:0.4.20-3
ProcVersionSignature: Ubuntu 5.11.0-38.42-generic 5.11.22
Uname: Linux 5.11.0-38-generic x86_64
ApportVersion: 2.20.11-0ubuntu65.4
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Sat Oct 30 08:55:11 2021
InstallationDate: Installed on 2020-05-05 (542 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
PackageArchitecture: all
SourcePackage: python-magic
UpgradeStatus: Upgraded to hirsute on 2021-05-07 (175 days ago)

Revision history for this message
Juerg Haefliger (juergh) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.