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


Groups > comp.lang.python > #82639

Re: Python console rejects an object reference, having made an object with that reference as its name in previous line

Path csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <torriem+gmail@torriefamily.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.068
X-Spam-Evidence '*H*': 0.86; '*S*': 0.00; 'syntax': 0.04; 'subject:Python': 0.06; 'input,': 0.09; 'python': 0.11; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'ioerror:': 0.16; 'pressing': 0.16; 'subject: \n ': 0.16; 'subject:object': 0.16; 'do,': 0.16; 'wrote:': 0.18; 'input': 0.22; 'import': 0.22; 'header:User-Agent:1': 0.23; 'error': 0.23; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; "doesn't": 0.30; '"",': 0.31; '>>>>': 0.31; 'subject:that': 0.31; 'file': 0.32; '(most': 0.33; 'actual': 0.34; 'problem': 0.35; 'subject:with': 0.35; 'one,': 0.35; 'error.': 0.37; 'message-id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'previous': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'read': 0.60; 'above,': 0.60; 'skip:n 30': 0.60; 'skip:o 30': 0.61; 'such': 0.63; 'chance': 0.65; 'kept': 0.65; 'between': 0.67; 'line,': 0.68; '(ie': 0.84; 'directory:': 0.84; 'fourth': 0.84; 'happening?': 0.84; 'subject:made': 0.84
X-Virus-Scanned amavisd-new at torriefamily.org
Date Thu, 18 Dec 2014 09:35:45 -0700
From Michael Torrie <torriem@gmail.com>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131118 Thunderbird/17.0.11
MIME-Version 1.0
To python-list@python.org
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>
In-Reply-To <70b86783-13dc-419b-a69b-0922ba976520@googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.17033.1418920552.18130.python-list@python.org> (permalink)
Lines 28
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1418920552 news.xs4all.nl 2829 [2001:888:2000:d::a6]:50018
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:82639

Show key headers only | View raw


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


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