Skip to content

RuntimeWarning and Correct invocation on the shell command line (not python script) #158

Open
@m040601

Description

@m040601

Thanks for your work maintaining and keeping this very usefull library up to date.

Could you please add a line to the README front page,
describing the correct invocation of this library on the command line ?

Apologies if this may sound "obvious" to the developer, but I'm just an end user, not a python expert.

I use it a lot in shell scripts, not python scripts.
For a long time I had just simply typed:

python -m readability -h

or

python -m readability -u https://someurl

Some time ago something changed,
and I had to start invoking it like this

python -m readability.readability -u ...

But lately I can't get rid of this anoying error message, that gets output to STDERR

/usr/lib/python3.8/runpy.py:127: RuntimeWarning: readability.readability found in sys.modules after import of package readability, but prior to execution of readability.readability; this may result in unpredictable behaviour
  warn(RuntimeWarning(msg))

It still works, but then that STDERR "pollutes" my shell scripts execution. Tried googling for what it means, but my python skills are lacking.

I'm on Arch Linux, system python version 3.8.6, and I get python-readability library installed via this package, https://aur.archlinux.org/packages/python-readability-lxml. My system if of course up to date, and python wise I dont get any other problems.

I just cant understand if this error, is something intrinsic to this tool, my Python installation or the way I'm am calling this library on the command line.

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions