python-magic is incomplete on Ubuntu LTS?
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
file (Ubuntu) |
Confirmed
|
High
|
Unassigned |
Bug Description
Binary package hint: file
I'm running Ubuntu 10.04 LTS.
I installed python-magic with: sudo apt-get install python-magic (the file that gets installed is python-
However, when I start Python (version 2.6.5) and I "import magic" and I then do "dir(magic)", it seems as though the module does not contain all the definitions that I can see on python-magic's github repo (i.e. the Ubuntu package seems outdated):
['MAGIC_APPLE', 'MAGIC_CHECK', 'MAGIC_COMPRESS', 'MAGIC_CONTINUE', 'MAGIC_DEBUG', 'MAGIC_DEVICES', 'MAGIC_ERROR', 'MAGIC_MIME', 'MAGIC_
What's up? Am I doing something wrong?
Joubert
Changed in file (Ubuntu): | |
status: | New → Confirmed |
tags: | added: xenial yakkety |
summary: |
- python-magic is incomplete on Ubuntu 10.04 LTS? + python-magic is incomplete on Ubuntu LTS? |
Changed in file (Ubuntu): | |
importance: | Undecided → High |
tags: | added: zesty |
tags: | removed: yakkety |
tags: | added: artful |
tags: | added: bionic |
tags: |
added: cosmic removed: artful zesty |
tags: |
added: disco removed: bionic cosmic |
I have the same problem on natty with python-magic 5.04-5ubuntu2 and python 2.7.1-0ubuntu5.
The magic module does not contain the Magic class, rendering the module useless.
On the off chance someone doesn't know, a workaround is:
sudo apt-get remove python-magic
sudo apt-get install python-pip
sudo pip install python-magic