Coder Social home page Coder Social logo

Comments (5)

sim0nx avatar sim0nx commented on June 29, 2024 3

Hi,
Thanks for the report.
The code is generic, the problem in my opinion lies in a third-party dependency which is not installed.
I don't have an OSX for testing this myself unfortunately.

You do have the python module file-magic installed, which eml_parser uses if it is available.
According to the error you get I assume that it is unable to load the libmagic library.

Could you please make sure the libmagic library is correctly installed?
I am not really familiar with OSX thus I can't advise you how to install it, according to some snippet this should be doable via brew:
https://gist.github.com/eparreno/1845561

Please let me know if this was of any help and if you got it to work :-)

from eml_parser.

amine-plutoflume avatar amine-plutoflume commented on June 29, 2024

indeed, installing libmagic fixed the issue,
thanks !

from eml_parser.

sim0nx avatar sim0nx commented on June 29, 2024

Glad that did the trick :-)

from eml_parser.

ndebard avatar ndebard commented on June 29, 2024

Doesn't work for me:

pn1715628:src nathan$ python3.6
Python 3.6.3 (v3.6.3:2c5fed86e0, Oct 3 2017, 00:32:08)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import magic
Traceback (most recent call last):
File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/magic.py", line 61, in
_open = _libraries['magic'].magic_open
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ctypes/init.py", line 361, in getattr
func = self.getitem(name)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ctypes/init.py", line 366, in getitem
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(RTLD_DEFAULT, magic_open): symbol not found
^D
pn1715628:src nathan$ sudo -H python3.6 -m pip install libmagic
Password:
Requirement already satisfied: libmagic in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
pn1715628:src nathan$

from eml_parser.

sim0nx avatar sim0nx commented on June 29, 2024

@ndebard the python module you installed is not the correct one.
eml_parser needs file-magic
If you installed eml_parser using pip, the correct library is already installed.

What you are missing is the libmagic system library (this is not a python library!) as noted in the OSX link I posted earlier:
https://gist.github.com/eparreno/1845561

from eml_parser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.