# Python Mastery Course: Debugging lesson syntax errors

**URL:** https://forum.codewithmosh.com/t/python-mastery-course-debugging-lesson-syntax-errors/16871
**Category:** Python
**Created:** [December 4, 2022, 11:11pm UTC](https://forum.codewithmosh.com/t/python-mastery-course-debugging-lesson-syntax-errors/16871 "2022-12-04T23:11:45Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![sevenshade](https://avatars.discourse-cdn.com/v4/letter/s/258eb7/32.png) [@sevenshade](https://forum.codewithmosh.com/u/sevenshade)
#### Post date: [December 4, 2022, 11:11pm UTC](https://forum.codewithmosh.com/t/python-mastery-course-debugging-lesson-syntax-errors/16871/1 "2022-12-04T23:11:45Z")

</div>

Hi everyone,

I am a beginner going through the complete python mastery course and I am encountering a syntax error when I try to follow along with the debugging lesson (video 9 under functions).

I am currently using python 3.11.0 and VS Code version 1.73

the code I am copying from the lesson is:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/2/20308324de5ac464387efdb87f861b28080f8ce9.png)

and this is the error I have been getting:

Start  
Traceback (most recent call last):  
File “e:\Personal\_Work\Coding\Python\app.py”, line 9, in   
print(multiply(1, 2, 3))  
^^^^^^^^^^^^^^^^^  
File “e:\Personal\_Work\Coding\Python\app.py”, line 4, in multiply  
total \*= numbers  
TypeError: can’t multiply sequence by non-int of type ‘tuple’

[Done] exited with code=1 in 0.089 seconds

I am a little confused because the same code appears to work in the lesson. Is there something I am missing because this is a new version of python?

I did get it to return the proper value but only by changing line 3 from “ **number** in numbers” to “ **numbers** in numbers” but I do not now if this will cause me problems in the future while going through other lessons.

any insight on this will be appreciated,

Thanks!

---

<div class="post-metadata">

### Author: ![jmrunkle](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/jmrunkle/32/3765_2.png) [@jmrunkle](https://forum.codewithmosh.com/u/jmrunkle)
#### Post date: [December 5, 2022, 12:28am UTC](https://forum.codewithmosh.com/t/python-mastery-course-debugging-lesson-syntax-errors/16871/2 "2022-12-05T00:28:19Z")

</div>

Are you certain the file was saved when you got the error? I just checked and it definitely works with the syntax you have written out. It should not be getting that error if you use the code you have shown.

---

<div class="post-metadata">

### Author: ![sevenshade](https://avatars.discourse-cdn.com/v4/letter/s/258eb7/32.png) [@sevenshade](https://forum.codewithmosh.com/u/sevenshade)
#### Post date: [December 5, 2022, 2:57pm UTC](https://forum.codewithmosh.com/t/python-mastery-course-debugging-lesson-syntax-errors/16871/4 "2022-12-05T14:57:21Z")

</div>

yes I am certain. Even when I type the code into a new file I get the same Type error message. Could it be a setting I might have accidentally switched on?

I also am getting these problems when trying to execute the code.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/8/8f5ca6287b3fb6813782500a2e1a75a4043d18dc.png)

maybe it’s something wrong with my pylint plugin?

---

<div class="post-metadata">

### Author: ![jmrunkle](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/jmrunkle/32/3765_2.png) [@jmrunkle](https://forum.codewithmosh.com/u/jmrunkle)
#### Post date: [December 5, 2022, 3:37pm UTC](https://forum.codewithmosh.com/t/python-mastery-course-debugging-lesson-syntax-errors/16871/5 "2022-12-05T15:37:39Z")

</div>

I see the bug now, can’t believe I missed it before:

```python
total *= numbers

```

should be:

```python
total *= number

```

And no, pylint is not the issue here.

---

<div class="post-metadata">

### Author: ![sevenshade](https://avatars.discourse-cdn.com/v4/letter/s/258eb7/32.png) [@sevenshade](https://forum.codewithmosh.com/u/sevenshade)
#### Post date: [December 5, 2022, 5:17pm UTC](https://forum.codewithmosh.com/t/python-mastery-course-debugging-lesson-syntax-errors/16871/6 "2022-12-05T17:17:47Z")

</div>

ah yes it works now! thank you so much, I can’t believe I didn’t catch that simple mistake sooner.

---

<div class="post-metadata">

### Author: ![Jarvis](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@Jarvis](https://forum.codewithmosh.com/u/Jarvis)
#### Post date: [January 2, 2023, 8:57pm UTC](https://forum.codewithmosh.com/t/python-mastery-course-debugging-lesson-syntax-errors/16871/7 "2023-01-02T20:57:22Z")

</div>

Tuples are immutable so thus causing this error

```auto
def multipy(*numbers):
    total = 1
    for number in numbers:
        total *= number
    return total

print("Start")
print(multipy(1, 2, 3))

```
