Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #85244
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!81.171.88.16.MISMATCH!hq-usenetpeers.eweka.nl!hq-usenetpeers.eweka.nl!bcyclone01.am1.xlned.com!bcyclone01.am1.xlned.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <syedk@pacificloud.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.062 |
| X-Spam-Evidence | '*H*': 0.88; '*S*': 0.00; 'socket': 0.07; 'sys': 0.07; 'spaces': 0.09; 'def': 0.12; 'httperror': 0.16; 'tab': 0.16; 'url:windows': 0.16; 'subject:python': 0.16; 'import': 0.22; 'issue.': 0.22; 'error': 0.23; 'recognize': 0.24; 'options': 0.25; 'skip:" 30': 0.26; 'skip:" 40': 0.26; 'downloaded': 0.26; 'skip:" 20': 0.27; 'skip:_ 20': 0.27; 'tried': 0.27; '8bit%:3': 0.30; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'getting': 0.31; '"': 0.31; 'indentation': 0.31; "skip:' 40": 0.31; 'file': 0.32; 'class': 0.32; 'run': 0.32; 'skip:& 30': 0.33; 'subject:with': 0.35; 'received:209.85': 0.35; 'skip:s 30': 0.35; 'editor': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'error.': 0.37; 'received:209': 0.37; 'expected': 0.38; 'skip:& 10': 0.38; 'handle': 0.38; 'to:addr:python-list': 0.38; 'skip:_ 30': 0.39; 'skip:& 20': 0.39; 'to:addr:python.org': 0.39; 'space': 0.40; 'skip:a 30': 0.61; 'such': 0.63; 'different': 0.65; 'between': 0.67; 'skip:r 40': 0.68; 'skip:r 30': 0.69; 'skip:* 70': 0.78; 'azure': 0.84; 'httprequest,': 0.84; 'syed': 0.84 |
| 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 :content-type; bh=xBGJ6PrLIjv3lo1Wz81CqmHKzb75t8WDKn8x04YrqUM=; b=CzA06X72xpUA9f5m76t6/Jw+LYNbfuD/X5PFBlPgpCLwCZU+TtnwdSW074nCukxE4A ZxqWdwE5thOBTTgHJ2Z/zL7IEDLSjmkx3+fBskifycIwozwHCqL2iFH57LSRZvDP0UaR 4tiYZ2QOsrJz1XSyYuDOo8l4HA7S2zJAMnToWfQ3/EDqGZMivWu69DogyBbyApDwn9cT Fdk/gIaVvEeR9rXZ/OnjFFYMmZoKAIsU/gl7+9gtnvPfdJiN2ycZ5/AWmLim5ZnjWflq GaSglUJe4lHmBnGYjKSqTOQ5QGw9hW355PQiRgE9buXUiUfHvWGdvGJ68H903otaotgZ tpJg== |
| X-Gm-Message-State | ALoCoQn903booDkDkPD716Ned6k4KICUWeclKFbsnNaljzs8l/2mWKUgjT/OeYYA7HBYI8ve+yOo |
| MIME-Version | 1.0 |
| X-Received | by 10.152.29.6 with SMTP id f6mr1304618lah.82.1423105673886; Wed, 04 Feb 2015 19:07:53 -0800 (PST) |
| X-Originating-IP | [98.155.101.136] |
| Date | Wed, 4 Feb 2015 19:07:53 -0800 |
| Subject | Indentation issues with python |
| From | syed khalid <syedk@pacificloud.com> |
| To | python-list@python.org |
| Content-Type | multipart/alternative; boundary=089e0158c78a2b9516050e4e9c63 |
| 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.18482.1423105677.18130.python-list@python.org> (permalink) |
| Lines | 105 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1423105677 news.xs4all.nl 2859 [2001:888:2000:d::a6]:40674 |
| X-Complaints-To | abuse@xs4all.nl |
| X-Received-Body-CRC | 1793377056 |
| X-Received-Bytes | 7703 |
| Xref | csiph.com comp.lang.python:85244 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
I downloaded this code and am attempting to run it. I keep getting
indentation error. there is a way to handle it with a editor which can
recognize the tab or space issue. I have tried different options such as 2
or 3 spaces or tab to no avail.
I have encased the error mesage with line 23 between "****************"
import sys
import azure
import socket
from azure.servicebus import (
_service_bus_error_handler
)
from azure.servicebus.servicebusservice import (
ServiceBusService,
ServiceBusSASAuthentication
)
from azure.http import (
HTTPRequest,
HTTPError
)
from azure.http.httpclient import _HTTPClient
class EventHubClient(object):
def sendMessage(self,body,partition):eventHubHost =
"pac-ns.servicebus.windows.net"
httpclient = _HTTPClient(service_instance=self)
********************************************************************
File "test1.py", line 23
def sendMessage(self,body,partition):
^
IndentationError: expected an indented block
***********************************************************************
sasKeyName = "SendPolicy"
sasKeyValue = "erENqf/5wdWCNEbCA9NsDIRqd5MRKdkii07+wezl/NU="
authentication = ServiceBusSASAuthentication(sasKeyName,sasKeyValue)
request = HTTPRequest()
request.method = "POST"
request.host = eventHubHost
request.protocol_override = "https"
request.path = "/myhub/publishers/" + partition +
"/messages?api-version=2014-05
"
request.body = body
request.headers.append(('Content-Type',
'application/atom+xml;type=entry;charset
=utf-8'))
authentication.sign_request(request, httpclient)
request.headers.append(('Content-Length', str(len(request.body)))
--
*Syed Khalid*
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Indentation issues with python syed khalid <syedk@pacificloud.com> - 2015-02-04 19:07 -0800 Re: Indentation issues with python Denis McMahon <denismfmcmahon@gmail.com> - 2015-02-05 11:46 +0000
csiph-web