NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Support Forum » Problem running feed-reader.py

August 27, 2011
by plehrer
plehrer's Avatar

I constructed the LED Array kit and got everything working through running serial-comm.py. I then tried running

python feed-reader.py | serial-comm.py

and I get this error message no matter "feed-url" I run.

Fail: [Errno 10061] No connection could be made because the target machine actively refused it

Here is some of the code:

#set the feed_url variable for the feed you want ot read.
#feed_url = "http://sports.espn.go.com/espn/rss/mlb/news"
feed_url = "http://www.cnbc.com/id/19746125/device/rss/rss.xml"
#feed_url = "http://twitter.com/statuses/user_timeline/19753668.rss"
#feed_url = "http://search.twitter.com/search.rss?q=+nerdkit+OR+nerdkits"
#feed_url = "http://www.weather.gov/xml/current_obs/KSAN.rss"

sys.stdout.flush()
HOST = 'localhost'    # The remote host
PORT = 7777

I also tried the program with PORT 80 and I get the same error message.

August 27, 2011
by plehrer
plehrer's Avatar

I forgot to say I am running the program on the power shell on a Windows 7 machine.

August 27, 2011
by plehrer
plehrer's Avatar

I made a mistake above. From the power shell command prompt I run the command:

python feed-reader.py | python serial-comm.py

not

python feed-reader.py | serial-comm.py

Thanks.

August 27, 2011
by 6ofhalfdozen
6ofhalfdozen's Avatar

Is is possible this is a firewall issue on either your machine or the links listed not liking how you are trying to access them? "Actively Refused it" sounds like its a valid port, just blocked or firewalled. I know a lot of machines are now setup to explicitly block all port calls unless it is for specific ports and "approved" connections. Just a thought..

August 27, 2011
by plehrer
plehrer's Avatar

I just discovered I am able to get the feed-reader.py script to work by first running

python serial-comm.py

in a separate command shell. However the feed doesn't show on the LED Array, it just shows on the shell.

Peter

August 28, 2011
by plehrer
plehrer's Avatar

Hi 6ofhalfdozen,

I tried shutting off my firewall but I still experienced the same problem. What is interesting is that if I run serial-comm.py and feed-reader.py, the feed-reader program works but it doesn't show up on the led array.

peter

August 28, 2011
by plehrer
plehrer's Avatar

Good news. I got

python feed-reader.py | serial-comm.py

to work fine on Ubuntu Linux running on vmware.

It is properly reading the feed and outputting it to the LED Array kit.

Post a Reply

Please log in to post a reply.

Did you know that you need to think about wires differently when you're transmitting signals more than a few inches? Learn more...