[Bug 603128] Re: python-magic is incomplete on Ubuntu 10.04 LTS?

Rob van der Linde 603128 at bugs.launchpad.net
Mon Jan 27 23:14:22 UTC 2014


Seems to be broken on Ubuntu 12.04 and 13.10 and possibly all versions
between that.

Not sure what is up with this, is this actually a different library than
"pip install python-magic" will install???

>>> import magic                                                                                                                                                                                                                             
>>> magic.from_buffer                                                                                                                                                                                                                        
Traceback (most recent call last):                                                                                                                                                                                                           
  File "<stdin>", line 1, in <module>                                                                                                                                                                                                        
AttributeError: 'module' object has no attribute 'from_buffer' 

Also I noticed the version is completely wrong it's like version 5.04
when python-magic on pip is 0.4.6, what is up with that?

https://pypi.python.org/pypi/python-magic/

Unfortunately I need this package desperately, so I am going to have to
package it up myself and bump up the version of the package, even though
it's wrong, so that it will overinstall the broken python-magic package.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to file in Ubuntu.
https://bugs.launchpad.net/bugs/603128

Title:
  python-magic is incomplete on Ubuntu 10.04 LTS?

Status in “file” package in Ubuntu:
  Confirmed

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-magic_5.03-5ubuntu1_i386.deb)

  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_MIME_ENCODING', 'MAGIC_MIME_TYPE', 'MAGIC_NONE',
  'MAGIC_NO_CHECK_APPTYPE', 'MAGIC_NO_CHECK_CDF',
  'MAGIC_NO_CHECK_COMPRESS', 'MAGIC_NO_CHECK_ELF',
  'MAGIC_NO_CHECK_ENCODING', 'MAGIC_NO_CHECK_SOFT',
  'MAGIC_NO_CHECK_TAR', 'MAGIC_NO_CHECK_TEXT', 'MAGIC_NO_CHECK_TOKENS',
  'MAGIC_PRESERVE_ATIME', 'MAGIC_RAW', 'MAGIC_SYMLINK', '__doc__',
  '__file__', '__name__', '__package__', 'error', 'open']

  What's up? Am I doing something wrong?

  Joubert

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/file/+bug/603128/+subscriptions



More information about the foundations-bugs mailing list