Hello, I'm not aware of any issues. Let me check with my teammate who is our resident expert in Python. I'll get back to you when I've learned more.
Best, Nadine, AdWords API Team On Wednesday, March 16, 2016 at 11:41:55 AM UTC-4, fol...@brainlabsdigital.com wrote: > > When I try to run a particular script in python3.5 I get the error: > > > AttributeError: 'bytes' object has no attribute 'encode'. Is this common > or am I doing something wrong. > > Python 2.7 works perfect. > > The particular line of code that causes this is > batch_job_helper.UploadOperations(upload_url, operations). > > Assume the operations and upload_url are perfectly fine, as I can run the > same line in python2 and it works fine. > > stack trace is below: > > File > "/Users/folusoogunlana/Documents/webProgramming/brainlabs/ts/techstack/brsb/brsb_helper.py", > > line 661, in upload_batch_operations > > batch_job_helper.UploadOperations(upload_url, operations) > > File > "/Users/folusoogunlana/.virtualenvs/blabs/lib/python3.5/site-packages/googleads/adwords.py", > > line 845, in UploadOperations > > uploader.UploadOperations(operations, is_last=True) > > File > "/Users/folusoogunlana/.virtualenvs/blabs/lib/python3.5/site-packages/googleads/adwords.py", > > line 990, in UploadOperations > > current_content_length=self._current_content_length, is_last=is_last) > > File > "/Users/folusoogunlana/.virtualenvs/blabs/lib/python3.5/site-packages/googleads/adwords.py", > > line 591, in BuildUploadRequest > > has_suffix=is_last) > > File > "/Users/folusoogunlana/.virtualenvs/blabs/lib/python3.5/site-packages/googleads/adwords.py", > > line 628, in _BuildUploadRequestBody > > for operations_list in operations]) > > File > "/Users/folusoogunlana/.virtualenvs/blabs/lib/python3.5/site-packages/googleads/adwords.py", > > line 628, in <listcomp> > > for operations_list in operations]) > > File > "/Users/folusoogunlana/.virtualenvs/blabs/lib/python3.5/site-packages/googleads/adwords.py", > > line 714, in _GenerateOperationsXML > > return self._ExtractOperations(self._GenerateRawRequestXML(operations)) > > File > "/Users/folusoogunlana/.virtualenvs/blabs/lib/python3.5/site-packages/googleads/adwords.py", > > line 653, in _ExtractOperations > > mutate = self._GetRawOperationsFromXML(full_soap_xml) > > File > "/Users/folusoogunlana/.virtualenvs/blabs/lib/python3.5/site-packages/googleads/adwords.py", > > line 768, in _GetRawOperationsFromXML > > root = ElementTree.fromstring(raw_request_xml.encode('utf-8')) > AttributeError: 'bytes' object has no attribute 'encode' > > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/23d7d39f-8cef-4e8c-a080-3c5f8724cd0b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.