Open GoogleCodeExporter opened 8 years ago
To fix this issue consider replacing the code at Class Error at Errors.py on
common folder with:
class Error(Exception):
"""Implements Error.
Responsible for handling error.
"""
def _get_message(self):
return self._message
def _set_message(self, message):
self._message = message
message = property(_get_message, _set_message)
Original comment by rogerio....@gmail.com
on 10 Nov 2010 at 4:49
The problem about python 2.6 still remains regarding the second error where the
api does not find the installation for PyXML, looking for a solution.
Original comment by rogerio....@gmail.com
on 10 Nov 2010 at 4:51
Are you using SOAPpy or ZSI? And which version?
Original comment by api.sgri...@gmail.com
on 11 Nov 2010 at 1:18
ZSI, the latest version
Original comment by rogerio....@gmail.com
on 11 Nov 2010 at 1:25
Could you be more specific? If by latest you mean v2.1, then that one isn't
stable version and is not supported by the client library. The client library
supports v2.0 of ZSI, which is the latest stable version.
Original comment by api.sgri...@gmail.com
on 11 Nov 2010 at 1:31
2.0-rc3 using command sudo easy_install ZSI
Original comment by rogerio....@gmail.com
on 11 Nov 2010 at 2:54
According to
http://stackoverflow.com/questions/1272138/baseexception-message-deprecated-in-p
ython-2-6, it should also work if you rename the base message. Could you verify
if this works?
class Error(Exception):
"""Implements Error.
Responsible for handling error.
"""
def __init__(self, msg):
self.msg = msg
def __str__(self):
return str(self.msg)
def __call__(self):
return (self.msg,)
Original comment by api.sgri...@gmail.com
on 17 Nov 2010 at 6:19
Yes, it worked. The messages about deprecated errors doe not appear anymore:
python get_all_placements.py
Traceback (most recent call last):
File "get_all_placements.py", line 39, in <module>
placements = DfpUtils.GetAllEntitiesByStatement(client, 'Placement')
File "/Library/Python/2.6/site-packages/adspygoogle/dfp/DfpUtils.py", line
100, in GetAllEntitiesByStatement
% method_name)
File "<string>", line 1, in <module>
File
"/Library/Python/2.6/site-packages/adspygoogle/dfp/PlacementService.py",
line 151, in GetPlacementsByStatement
request)
File "/Library/Python/2.6/site-packages/adspygoogle/dfp/DfpWebService.py",
line 193, in CallMethod
self.__ManageSoap(buf, start_time, stop_time, error)
File "/Library/Python/2.6/site-packages/adspygoogle/dfp/DfpWebService.py",
line 118, in __ManageSoap
raise Error(e)
adspygoogle.common.Errors.Error:
Traceback (most recent call last):
File "/Library/Python/2.6/site-packages/adspygoogle/common/WebService.py",
line 208, in CallMethod
eval('service.%s(request)' % method_name))
File "<string>", line 1, in <module>
File
"/Library/Python/2.6/site-packages/adspygoogle/dfp/zsi/v201010/PlacementService_
services.py",
line 69, in getPlacementsByStatement
self.binding.Send(None, None, request, soapaction="", **kw)
File "build/bdist.macosx-10.6-universal/egg/ZSI/client.py", line 267, in
Send
self.SendSOAPData(soapdata, url, soapaction, **kw)
File "build/bdist.macosx-10.6-universal/egg/ZSI/client.py", line 301, in
SendSOAPData
self.h.send(soapdata)
File
"/Library/Python/2.6/site-packages/adspygoogle/common/zsi/HttpsConnectionHandler
.py",
line 93, in send
httplib.HTTPSConnection.endheaders(self)
File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.
py",
line 868, in endheaders
self._send_output()
File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.
py",
line 740, in _send_output
self.send(msg)
File
"/Library/Python/2.6/site-packages/adspygoogle/common/zsi/HttpsConnectionHandler
.py",
line 93, in send
httplib.HTTPSConnection.endheaders(self)
File
"/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.
py",
line 866, in endheaders
raise CannotSendHeader()
CannotSendHeader [RAW DATA: _________________________________ Wed Nov 17
09:52:30 2010 REQUEST:
<SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ZSI="
http://www.zolera.com/schemas/ZSI/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><RequestHeader
xmlns="https://www.google.com/apis/ads/publisher/v201010"><applicationName>DfpAp
i-Python-4.0.0|salesflow</applicationName><authToken>DQAAAH8AAADm_hEomn1nyn4Psy8
Uibuqi1_NukTVvc3ZXaIIHm7UbeSAvhycZXgdqjx4Iv44PXoe6vWPp6stJVSDseyHCjyM8BhBUMpP_HG
8wNLjbsS2YLQjgbkjcDcuyRg0HuoxPXqiN2yw3yByMRI58u_gLmoXCftxIhg_y_aNdjGya7JZmQ</aut
hToken></RequestHeader></SOAP-ENV:Header><SOAP-ENV:Body
xmlns:ns1="https://www.google.com/apis/ads/publisher/v201010"><ns1:getPlacements
ByStatement
xmlns:ns1="https://www.google.com/apis/ads/publisher/v201010"><ns1:filterStateme
nt
xsi:type="ns1:Statement"><ns1:query> LIMIT 500 OFFSET
0</ns1:query></ns1:filterStatement></ns1:getPlacementsByStatement></SOAP-ENV:Bod
y></SOAP-ENV:Envelope>
]
Rog�rio Carrasqueira
Original comment by rogerio....@gmail.com
on 17 Nov 2010 at 11:54
Great! I'll patch it in for the next release.
Original comment by api.sgri...@gmail.com
on 23 Nov 2010 at 10:11
Any news??
Original comment by rogerio....@gmail.com
on 18 Jan 2011 at 6:46
The next release is planned within next couple of weeks. Thanks!
Original comment by api.sgri...@gmail.com
on 27 Jan 2011 at 2:25
Original issue reported on code.google.com by
rogerio....@gmail.com
on 10 Nov 2010 at 3:19