On 05/12/2019 19:40, Rhodri James wrote:
On 05/12/2019 19:30, Rhodri James wrote:
On 05/12/2019 18:49, RobH wrote:
Update:
I did python3 Internet.py
and now only get this error:

pi@raspberrypi:~/Downloads $ python3 Internet.py
   File "Internet.py", line 24
     font = ImageFont.truetype( 'Minecraftia.ttf', 35)
                                                     ^
TabError: inconsistent use of tabs and spaces in indentation

I cannot see what is wrong, as the text is all lined up with that above and below:

The problem will be that you have a mix of tabs and spaces in your indentation.  This causes problems because some people don't think that the One True Tab Width is 8 characters ;-) so to them the indentation looks ragged.  Worse, when they mix tabs and spaces, code that looks to be at the same indentation level to them looks different to the interpreter.  The decision was taken a while ago that Python should put its foot down about this, and demand that we use either all tabs or all spaces for our indentation.  That's what you've fallen foul off; there must be a mix of tabs and spaces in that line!

Or more likely you've used tabs on that line and spaces elsewhere, or vice versa.  I should have remember to say that, sorry.


Ok thanks for the explanation there, and I have placed the cursor at the beginning of the first indented line. Moving down 1 line at a time , each line is at the same position upto line 157 in the authors code . Then it is closer in to the edge upto line 190, where it goes back out again.

What is my best course of action here now.

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to