0

I am trying to import and use feedparser in Alexa hosted python skill.

It works fine before I write import feedparser but as soon I add import feedparser it says:

There was a problem with the requested skill's response

jkdev
  • 11,360
  • 15
  • 54
  • 77
Aqib Farid
  • 128
  • 1
  • 4
  • 14
  • Does this answer your question? [How to import Python external libraries with Alexa Skill Kit SDK?](https://stackoverflow.com/questions/58779561/how-to-import-python-external-libraries-with-alexa-skill-kit-sdk) – rivamarco Dec 23 '19 at 15:28

1 Answers1

0

As feedparser is an external package, you'll need to install it before you can import it. Normally, you'd do this by running e.g. pip install feedparser in the terminal, but you can't do that in the Developer Console. Instead, add the packages that you want use in the requirements.txt file, found in the directory tree on the left.

So for feedparser add a row which reads:

feedparser>=5.2.1

(5.2.1 is the latest version of feedparser currently available.)

This is briefly covered in the Alexa Skills Kit docs as well.

Oscar Schafer
  • 1,215
  • 1
  • 12
  • 25