Skip to content

Assignment 1 for Windows #51

Open
Open
@johnrevans6

Description

@johnrevans6

I'm putting this here for posterity. No real action required.

Issue Summary:
Windows users not using the course's image may encounter an infuriatingly frustrating issue if they out their file using the command:

python twitterstream.py > output.txt

This defaults the encoding Windows-1252 and the output looks something like:

This will inevitably cause JSON parsing to fail.

Solution:

In Powershell, pipe in Out-File and force UTF-8. So something like:

python twitterstream.py | Out-File -Encoding "UTF8" output.txt

In command prompt, you actually need to convert the default encoding temporarily:

chcp 65001

Then run the command as normal. Then convert back:

chcp 1252

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions