Coder Social home page Coder Social logo

ashutoshkrris / 100-days-of-python Goto Github PK

View Code? Open in Web Editor NEW
164.0 3.0 122.0 28.23 MB

100 Days of Code Challenge with Python

Home Page: https://ashutoshkrris.github.io/100-Days-of-Python/

Python 2.32% HTML 0.95% CSS 0.71% SCSS 0.76% JavaScript 1.81% Jupyter Notebook 93.43%
python appbrewery 100daysofcode 100daysofpython code angela-yu python3

100-days-of-python's Issues

Error with encoding

Hi found that I received an error message when I coded along with the tutorial:

Traceback (most recent call last): File "C:\Users\XXX\PycharmProjects\bs4-start\main.py", line 5, in <module> contents = file.read() ^^^^^^^^^^^ File "C:\Users\XXX\AppData\Local\Programs\Python\Python311\Lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 281: character maps to <undefined>

To fix this, I needed to add an encoding value to the BeautifulSoup Class like so:

with open("website.html", **encoding="utf-8"**) as file:

hope this helps other people encountering the same issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.