codelucas / newspaper

newspaper3k is a news, full-text, and article metadata extraction in Python 3. Advanced docs:
https://goo.gl/VX41yK
MIT License
14.06k stars 2.11k forks source link

ValueError: bad marshal data (unknown type code) #527

Open maximilianchang opened 6 years ago

maximilianchang commented 6 years ago

When I run: "sudo python3 setup.py install", I get the following error:

screen shot 2018-03-08 at 10 28 51 pm

From reading online, I tried removing all the *.pyc files, to no result. I noted the old issue that discussed this, but that seemed resolved.

The strange thing is that it used to work, but more recently, it has failed to work on my VM (although it still works on my MAC). I'm running Debian 9 on my VM.

simonkeng commented 5 years ago

I am getting this as well. I'm on Raspbian. I also tried removing complied python files (per stackoverflow result) but this didn't solve it for me either. pip install newspaper3k works perfectly on my macOS machine, but I'm having trouble on linux.

Update

The regular pip install works great on RPi3, just beware that the lxml download step will take a very long time (1G RAM Model B). If you are inexperienced with Raspberry Pi's (like me) then you might think its hanging and there was an error.

Using the pip install route avoided the above issue entirely.

unkwn1-repo commented 5 years ago

Have you tried pip install newspaper3k- Jesse -- Securely sent with Tutanota.

If you forgot your conversation password. Please text me using Signal @ (647)571-7808.

Feb. 20, 2019, 11:28 p.m. by notifications@github.com:

I am getting this as well. I'm on Raspbian. I also tried removing complied python files (per stackoverflow result) but this didn't solve it for me either. > pip install> newspaper works perfectly on my macOS machine, but I'm having trouble on linux.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, > view it on GitHub https://github.com/codelucas/newspaper/issues/527#issuecomment-465857591> , or > mute the thread https://github.com/notifications/unsubscribe-auth/ARLg5pR9linYrX5CUetS1iwktVt3W1jbks5vPiBRgaJpZM4Sj0Rx> .

simonkeng commented 5 years ago

Yes, thanks @jessefogarty, like I said in my update above, the regular pip install newspaper3k worked great and totally avoided this error. Might consider closing this issue for now.

toshiro92 commented 4 years ago

For those who still facing this issue when manually install newspaper in Python3, there is the command you have to do to solve this problem:

pip3 install git+https://github.com/codelucas/newspaper.git

Source: https://stackoverflow.com/questions/30650098/error-in-installing-newspaper3k-package-via-pip