Giter VIP home page Giter VIP logo

Comments (4)

buriy avatar buriy commented on August 20, 2024

What is your python version? (I think the culprit is __init__.py handling that has changed in python 3.10)
The typical use to avoid this is
from readability.readability import Document

from python-readability.

stevenplatt avatar stevenplatt commented on August 20, 2024

On the Mac I am python version 3.8.9 (Mac OS Monterey). I tried from readability.readability import Document, but this returns a different error for not finding a module with name readability.

Stevens-MacBook-Pro:~ steven$ python3 --version
Python 3.8.9

I tried running on a Ubuntu 20.04 ARM VM (Running in Parallels on M1 mac) - it works as normal with no issue:

parallels@ubuntu-linux-20-04-desktop:~$ python3 --version
Python 3.8.10

I don't know enough about the python version difference to track down the culprit (and was planning to install into an ubuntu Docker container for my use). I am ok to close this one, if you don't have an M1 Mac test system. What do you think?

from python-readability.

buriy avatar buriy commented on August 20, 2024
python3
Python 3.8.10 (default, Mar 15 2022, 12:22:08) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import readability
>>> d=readability.Document(input='hello world')

It works. So please ensure you don't have a local file named "readability.py" , this is the most typical explanation of this error.

from python-readability.

stevenplatt avatar stevenplatt commented on August 20, 2024

You are correct, sorry about that. I indeed had a file with readability.py on my local machine. After removing that files, all is working as normal on M1 Mac. Thank you for helping.

from python-readability.

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.