Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #79400

Re: No Error; No Output...Nothing

From Matthew Ruffalo <mmr15@case.edu>
Date 2014-10-21 17:58 -0400
Subject Re: No Error; No Output...Nothing
References <d84ad0d4-a742-4ca7-93a6-b21f0ed076dd@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.15047.1413929083.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 10/21/2014 05:44 PM, ryguy7272 wrote:
> Hey everyone, I'm trying to run this code.
>
> ...
>
> I commented out the import pylab as pl because I couldn't get the matplotlib.pylab import working.  So, anyway, I hit F5, and it seems to run, but it doesn't really do anything.  Isn't this either supposed to be downloading data from the web, or throwing an error so I can troubleshoot, and try to figure out what's going on?  It's hard to troubleshoot, when you don't get any error.  Does this work for others?
>
> Thanks.
No, it isn't supposed to be downloading data from the web. You have
defined a few functions but you're not actually calling any of them. The
script terminates successfully with no output, since there's nothing for
it to do after executing your imports and function definitions.

Additionally, your attempted use of 'urllib2' inside
getConstituentsOfAnIndexFromYahoo will fail. Your import of that module
is commented out, since (from your imports) you're presumably using
Python 3 and a module with that name no longer exists. Since you have
'from urllib.request import urlopen', you can use the 'urlopen' module
without any fully-qualified name. The relevant line in your
getConstituentsOfAnIndexFromYahoo function should be 'pageResults =
p.findall(urlopen(...'.

MMR...

Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

No Error; No Output...Nothing ryguy7272 <ryanshuell@gmail.com> - 2014-10-21 14:44 -0700
  Re: No Error; No Output...Nothing Chris Angelico <rosuav@gmail.com> - 2014-10-22 08:49 +1100
  Re: No Error; No Output...Nothing Chris Kaynor <ckaynor@zindagigames.com> - 2014-10-21 14:49 -0700
  Re: No Error; No Output...Nothing Matthew Ruffalo <mmr15@case.edu> - 2014-10-21 17:58 -0400
  Re: No Error; No Output...Nothing ryguy7272 <ryanshuell@gmail.com> - 2014-10-21 15:15 -0700
    Re: No Error; No Output...Nothing Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-10-21 23:41 +0100

csiph-web