GithubHelp home page GithubHelp logo

Import refextract fails about refextract HOT 15 OPEN

inspirehep avatar inspirehep commented on July 4, 2024
Import refextract fails

from refextract.

Comments (15)

openp2pdesign avatar openp2pdesign commented on July 4, 2024 3

Which OS are you using? On Mac you can solve this with brew install libmagic

from refextract.

pHequals7 avatar pHequals7 commented on July 4, 2024 1

Is the project even maintained? Have the same importing error throws out invalid syntax error. Please solve it ASAP

from refextract.

Omar-Aboelsoud avatar Omar-Aboelsoud commented on July 4, 2024

@openp2pdesign I am using windows , I installed it using Anaconda with pip install command , but It fail when I import it

from refextract.

Nihabr avatar Nihabr commented on July 4, 2024

Im having a similar issue when importing refextract, however mine does not appear to be libmagic related:
refextract error

Im using python 3.6.5 on Windows 10, and refextract was installed using pip.

The import code is the same as in the project description example: from refextract import extract_references_from_file

from refextract.

bastiankayser avatar bastiankayser commented on July 4, 2024

Same here, Python 3.6.3 on Windows 10, refextract was installed using pip.
from refextract import extract_references_from_file
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\BKY\AppData\Roaming\Python\Python36\site-packages\refextract_init_.py", line 28, in
from .references.api import (
File "C:\Users\BKY\AppData\Roaming\Python\Python36\site-packages\refextract\references\api.py", line 96
raise FullTextNotAvailableError(u"URL not found: '{0}'".format(url)), None, sys.exc_info()[2]
^
SyntaxError: invalid syntax

from refextract.

srbhp avatar srbhp commented on July 4, 2024

This also happens in Linux(Debian). Install it using pip3.

Python 3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.

from refextract import extract_references_from_file
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.5/dist-packages/refextract/init.py", line 28, in
from .references.api import (
File "/usr/local/lib/python3.5/dist-packages/refextract/references/api.py", line 96
raise FullTextNotAvailableError(u"URL not found: '{0}'".format(url)), None, sys.exc_info()[2]
^
SyntaxError: invalid syntax
exit()

from refextract.

RaymondCui21 avatar RaymondCui21 commented on July 4, 2024

Same here, Python 2.7 on Windows 7, refextract was installed using pip.
Errors from Pycharm:
File "C:~\venv\2.7\lib\site-packages\magic.py", line 181, in
raise ImportError('failed to find libmagic. Check your installation')
ImportError: failed to find libmagic. Check your installation

from refextract.

RaymondCui21 avatar RaymondCui21 commented on July 4, 2024

Could the developers provide more workable environment details to repeat the processes, such as OS, Python versions, IDE? Many thanks.

from refextract.

patel-zeel avatar patel-zeel commented on July 4, 2024

This works for me on python 3.6 on colab.

sudo apt-get install -y python-magic

from refextract.

michamos avatar michamos commented on July 4, 2024

The previous version was not compatible with Python 3. Version 1.* is Python 3 only.

from refextract.

AxelBerres avatar AxelBerres commented on July 4, 2024

you need to install the related magic bin package

from refextract.

kingsj0405 avatar kingsj0405 commented on July 4, 2024

I'm failing without any exception...

>python
Python 3.8.2 (default, May  6 2020, 09:02:42) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from refextract import extract_references_from_url
# Just die without logging
>

from refextract.

walter-hernandez avatar walter-hernandez commented on July 4, 2024

For anyone experiencing this issue, this happens because you need to have magic-bin installed. Then, the solution is:

pip install python-magic-bin

from refextract.

shreyashgupta68 avatar shreyashgupta68 commented on July 4, 2024

I have already installed the magic bin still getting the same error.

from refextract.

josePereiro avatar josePereiro commented on July 4, 2024

For anyone experiencing this issue, this happens because you need to have magic-bin installed. Then, the solution is:

pip install python-magic-bin

This just worked for me Python 3.8.5 refextract 1.1.4

from refextract.

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.