Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #106951
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | salma ammar <ammarsalma118@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | IdentationError; unexpected indent |
| Date | Wed, 13 Apr 2016 16:53:09 +0100 |
| Lines | 35 |
| Message-ID | <mailman.79.1460562813.15650.python-list@python.org> (permalink) |
| References | <CABcnvxeMTSBd7EpjpiguRovHebn13N71KcxvJmuik1qfM7Rn1w@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| X-Trace | news.uni-berlin.de LQK/bbJAgwCrhhCRTpJnYQvSpM+dgTDsdnlHCKAAG67Q== |
| Return-Path | <ammarsalma118@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.052 |
| X-Spam-Evidence | '*H*': 0.90; '*S*': 0.00; 'unexpected': 0.09; 'received:209.85.218': 0.10; 'python': 0.10; 'dist': 0.16; 'f.read()': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; '(see': 0.20; 'please?': 0.22; 'skip:* 50': 0.22; 'appears': 0.23; 'code,': 0.23; 'advance.': 0.23; 'import': 0.24; 'error': 0.27; 'message-id:@mail.gmail.com': 0.27; 'executing': 0.27; 'correct': 0.28; 'skip:( 20': 0.28; 'print': 0.30; 'code': 0.30; 'run': 0.33; 'skip:d 20': 0.34; 'skip:& 20': 0.35; 'received:google.com': 0.35; 'skip:s 60': 0.35; 'but': 0.36; 'should': 0.36; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'received:209': 0.38; 'skip:p 20': 0.38; 'thank': 0.38; 'hi,': 0.38; 'to:addr:python.org': 0.40; 'filename:fname piece:jpg': 0.68; 'content-type:image/jpeg': 0.69; '2.7.': 0.84; 'edge,': 0.84; '*for': 0.91; 'subject:; ': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=9uIglwvJk6CnGYIRnRCHJLhRNdsD7wPTP8thPh1Lv3I=; b=z0IZmYEpLFWnL2Jwqa8OC6C+J2KbX1FwWvAKZ+rJG2QjPbLRlQWqVz7AgwoCmuHFtq AO8vtrcuBTdERwVCINZsAhm6RFNzpORgp+uZ2F1zdpaaappERp1F0rHgrjNv4sVywIEm wpgHvo4ckViMeZiHqzT0plEed9P2dHCZIAZy7a7zUadtxs8QnjBUEXbwXIOjzgeuVWSw B8BzFn6z/FjdWSYvYMNlhUMyTcW/WbGhuHk+vIP2MCug7ASazGnZYGPFzSDRY9bcpz6v Qlyc+oYpG6xcgJsTT0GHycoWzG2dyV7W3sQthby9wIsjYqF4baODHYpgYuHCL4O+DSrx IUNQ== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=9uIglwvJk6CnGYIRnRCHJLhRNdsD7wPTP8thPh1Lv3I=; b=HzOMfpoEivxoBs2vqZlX0PIJ4S4rGedOfCJCkoQFVR5TwPd/Om+SkuZjLH6431YEJp ZWrv15LWkaizaZwuzRSFUQ1cDpJweXGxyVLeb89+uz//APR44p8MrHGrL77TY7PN983v HN/gQ/WxIBiufyOAYAzQ/sEyAKk+5SMTDQsSCM5WGTd3W66rhHghBD8bKakIoL8BZ3Tn wqM/dZUjfTSFzOlAQ9MQQJIrOfUCOE7JGJYoEEtv4/Wll/5vkTzWZ4TSaI6yxXyHAMdl Z0H8k4yDqlwgxJTKalJz5HYli55eVy4tOpoeTItxqtwygGuYFY2Gwqpe/q50rkdVPn/9 Xsrg== |
| X-Gm-Message-State | AOPr4FUpQ4M5OA38fxBCvPj18H8LpVoREFEl3vEI0q4ZVpwKIXs95W7mGBdlnX5C+led7eWplycLvxzPCxFTWA== |
| X-Received | by 10.202.90.3 with SMTP id o3mr4735889oib.96.1460562789176; Wed, 13 Apr 2016 08:53:09 -0700 (PDT) |
| X-Mailman-Approved-At | Wed, 13 Apr 2016 11:53:32 -0400 |
| X-Content-Filtered-By | Mailman/MimeDel 2.1.21 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.21 |
| 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> |
| X-Mailman-Original-Message-ID | <CABcnvxeMTSBd7EpjpiguRovHebn13N71KcxvJmuik1qfM7Rn1w@mail.gmail.com> |
| Xref | csiph.com comp.lang.python:106951 |
Show key headers only | View raw
Hi,
I am about to run this code using python 2.7. But when executing this code,
an error appears (see attachement): IdentationError; unexpected indent
What should I rectify to correct this error please?
*import sys*
*sys.path.append('C:/Users/user/src/sumo-0.22.0/tools')*
*import sumolib*
*net =
sumolib.net.readNet("C:/Users/user/src/sumo-0.22.0/tools/sumolib/net/qgislyonvelo.net.xml")*
*radius = 0*
*f = open("C:/fichierstations.txt", "r")*
*contenu = f.read()*
*print(contenu)*
*for id, lat, lon in f:*
* x, y = net.convertLonLat2XY(lon, lat)*
* print(x, y)*
* edges = net.getNeighboringEdges(x, y, radius)*
* print (edges)*
* while len(edges) == 0:*
* radius = radius + 10*
* edges = net.getNeighboringEdges(x, y, radius)*
* distancesAndEdges = sorted([(dist, edge) for edge, dist in edges])*
* print(distancesAndEdges)*
* edgeofstation[id] = distancesAndEdges[0]*
* print (edgeofstation[id])*
*f.close()*
Thank you in advance.
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
IdentationError; unexpected indent salma ammar <ammarsalma118@gmail.com> - 2016-04-13 16:53 +0100 Re: IdentationError; unexpected indent Rob Gaddi <rgaddi@highlandtechnology.invalid> - 2016-04-13 16:02 +0000
csiph-web