Linked Questions

1 vote
1 answer
303 views

Possible Duplicate: builtins.TypeError: must be str, not bytes I wrote a program to write a dict to file and in Python 2.7 it works well, but now in Python 3 I receive TypeError: 'str' does not ...
JohnDow's user avatar
  • 1,332
0 votes
1 answer
190 views

I'm using this Python script to convert .XML wordpress files to .txt. This works fine for blogposts, however other post types it doesn't like. I've changed around some code, but it still isn't working ...
Jordi's user avatar
  • 53
255 votes
8 answers
414k views

I'm pulling data out of a Google doc, processing it, and writing it to a file (that eventually I will paste into a Wordpress page). It has some non-ASCII symbols. How can I convert these safely to ...
simon's user avatar
  • 6,155
348 votes
3 answers
152k views

I'm using python3.3 and I'm having a cryptic error when trying to pickle a simple dictionary. Here is the code: import os import pickle from pickle import * os.chdir('c:/Python26/progfiles/') def ...
John Rowland's user avatar
  • 3,659
82 votes
2 answers
203k views

I was looking for a way to run an external process from python script and print its stdout messages during the execution. The code below works, but prints no stdout output during runtime. When it ...
Michael IV's user avatar
  • 11.6k
30 votes
7 answers
46k views

I am using Gmail API to access my Gmail data and Google Python API client. According to documentation to get the message attachment they gave one sample for Python. But the same code I tried then I am ...
Rahul Kulhari's user avatar
7 votes
3 answers
12k views

How can I copy the source code of a website into a text file in Python 3? EDIT: To clarify my issue, here's what I have: import urllib.request def extractHTML(url): f = open('temphtml.txt', 'w')...
user1306802's user avatar
2 votes
1 answer
4k views

RESOLVED: Problem had to do with Python version, refer to stackoverflow.com/a/5513856/2540382 I am fiddling with htm -> txt file conversion and am having a little trouble. My project is ...
user3768533's user avatar
  • 1,357
0 votes
3 answers
1k views

I am attempting to create a program that will allow me to take in peoples info and then write it to an xml doc, save it, and then once the program is ran again, it will pick up from where I left off. ...
Hoyt's user avatar
  • 3
-1 votes
1 answer
774 views

I'm using HTMLRunner 1.1.1 which is compatible with python 3.5 my code is : dir=os.getcwd() photo_tests=unittest.TestLoader().loadTestsFromTestCase(Photo_Tests.Photo_Test) photo_tests_suit=unittest....
Akop Akopov's user avatar
0 votes
1 answer
502 views

Hopefully someone can help with this. Thanks for having a look! I am fairly new to django and programming in general so please bear with me. I am building a custom Profile app that has an avatar ...
Micah.Fay's user avatar
  • 789
0 votes
1 answer
382 views

Im am currently trying to generate QR codes for the keys of a dictionary.If I try that for one key only, it is no problem at all. However, if I try to automatize the process, incrementing my file ...
N.Brue's user avatar
  • 3