Skip to content

Update parse_out_email_text.py#1

Open
current-ag wants to merge 1 commit into
shantanugoel:masterfrom
current-ag:patch-1
Open

Update parse_out_email_text.py#1
current-ag wants to merge 1 commit into
shantanugoel:masterfrom
current-ag:patch-1

Conversation

@current-ag
Copy link
Copy Markdown

Hello,

Thank you for supplying this 3.x version of the course code.
When I got to this script in the course, the code was not running properly, throwing an AttributeError.
The string module in python has no attribute maketrans. So I made the following modification in line 28.

WAS : text_string = content[1].translate(string.maketrans("", ""), string.punctuation)

NOW : text_string = content[1].translate(str.maketrans("","", string.punctuation))

Hello, 

Thank you for supplying this 3.x version of the course code. 
When I got to this script in the course, the code was not running properly, throwing an AttributeError. 
The string module in python has no attribute maketrans. So I made the following modification in line 28. 

WAS :         text_string = content[1].translate(string.maketrans("", ""), string.punctuation)

NOW :        text_string = content[1].translate(str.maketrans("","", string.punctuation))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant