Skip to content

Challenge 10_04 file.open bug #3

@SammySteiner

Description

@SammySteiner

Issue Overview

When running 10_04_Challenge the line print(f'New file size: {os.path.getsize('10_04_challenge_art_encoded.txt')}') results in the error:

  Cell In[3], line 5
    print(f'New file size: {os.path.getsize('10_04_challenge_art_encoded.txt')}')
                                                  ^
SyntaxError: invalid decimal literal

Describe your environment

Observed in Chrome Version 113.0.5672.92, with Jupyter running in terminal using python 3.11, and vscode.

Steps to Reproduce

  1. Start Jupyter notebook for the course
  2. open http://localhost:8888/notebooks/exercise_files/10_04_Challenge.ipynb in your browser
  3. run the notebook

Expected Behavior

I would expect the notebook to find the text file and get it's size without throwing an error.

Current Behavior

The notebook runs an error when it reaches the line to open the updated text file

Possible Solution

Use double quotes for the filename, same as used two lines above.

Screenshots / Video

Screenshot 2023-05-19 at 9 23 28 AM

Related Issues

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