Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #82639
| Date | 2014-12-18 09:35 -0700 |
|---|---|
| From | Michael Torrie <torriem@gmail.com> |
| Subject | Re: Python console rejects an object reference, having made an object with that reference as its name in previous line |
| References | <01937423-e700-4825-a502-568dcb2d5324@googlegroups.com> <70b86783-13dc-419b-a69b-0922ba976520@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.17033.1418920552.18130.python-list@python.org> (permalink) |
On 12/18/2014 09:19 AM, Simon Evans wrote:
> @Steven D'Aprano,
> I input the following to Python 2.7, which got the following:-
> ----------------------------------------------------------------------------
>>>> from bs4 import BeautifulSoup
>>>> with open("ecologicalpyramid.html","r") as ecological_pyramid:
> ... soup= next(ecological_pyramid,"lxml")
> ... producer_entries = soup.find("ul")
> ...
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> IOError: [Errno 2] No such file or directory: 'ecologicalpyramid.html'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is the problem here. And it's not a syntax error.
> - I kept to your instructions to input the 'Enter' after the fourth
> line and then before the fifth line, ie between the indented block and
> the unindented one, which as above, doesn't give me a chance to actually
>input the fifth line. If I do it both ways, ie: pressing enter after the
>fourth and before the fifth or just pressing enter after the fourth and
>then after the fifth line of input, which again it won't actually let me
>input because before I do, I still get an error return.
Did you read the actual error message? In this case it's not a syntax
error. Do you understand what the error actually is and why it's
happening? (IE did your read what the error was? Hint. It's not the
same as your previous errors.)
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Python console rejects an object reference, having made an object with that reference as its name in previous line Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-12-14 08:15 -0800
Re: Python console rejects an object reference, having made an object with that reference as its name in previous line Ned Batchelder <ned@nedbatchelder.com> - 2014-12-14 11:36 -0500
Re: Python console rejects an object reference, having made an object with that reference as its name in previous line Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-12-14 10:37 -0800
Re: Python console rejects an object reference, having made an object with that reference as its name in previous line Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2014-12-14 20:51 +0200
Re: Python console rejects an object reference, having made an object with that reference as its name in previous line Billy Earney <billy.earney@gmail.com> - 2014-12-14 10:43 -0600
Re: Python console rejects an object reference, having made an object with that reference as its name in previous line Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-12-14 15:21 -0800
Re: Python console rejects an object reference, having made an object with that reference as its name in previous line Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-12-15 11:36 +1100
Re: Python console rejects an object reference, having made an object with that reference as its name in previous line Chris Roy-Smith <chris_roysmith@internode.on.net> - 2014-12-15 13:32 +1100
Re: Python console rejects an object reference, having made an object with that reference as its name in previous line Chris Angelico <rosuav@gmail.com> - 2014-12-15 13:42 +1100
Re: Python console rejects an object reference, having made an object with that reference as its name in previous line Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-12-15 02:47 +0000
Re: Python console rejects an object reference, having made an object with that reference as its name in previous line Michael Torrie <torriem@gmail.com> - 2014-12-14 22:27 -0700
Re: Python console rejects an object reference, having made an object with that reference as its name in previous line Chris Angelico <rosuav@gmail.com> - 2014-12-15 16:32 +1100
Re: Python console rejects an object reference, having made an object with that reference as its name in previous line Michael Torrie <torriem@gmail.com> - 2014-12-14 22:38 -0700
Re: Python console rejects an object reference, having made an object with that reference as its name in previous line Zachary Ware <zachary.ware+pylist@gmail.com> - 2014-12-14 23:51 -0600
Re: Python console rejects an object reference, having made an object with that reference as its name in previous line Chris Angelico <rosuav@gmail.com> - 2014-12-15 16:52 +1100
Re: Python console rejects an object reference, having made an object with that reference as its name in previous line Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-12-18 08:19 -0800
Re: Python console rejects an object reference, having made an object with that reference as its name in previous line Michael Torrie <torriem@gmail.com> - 2014-12-18 09:35 -0700
Re: Python console rejects an object reference, having made an object with that reference as its name in previous line Simon Evans <musicalhacksaw@yahoo.co.uk> - 2015-01-04 04:49 -0800
Re: Python console rejects an object reference, having made an object with that reference as its name in previous line Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-01-04 13:11 +0000
Re: Python console rejects an object reference, having made an object with that reference as its name in previous line Dave Angel <davea@davea.name> - 2015-01-04 09:14 -0500
csiph-web