Python Forum
SyntaxError: from simple python example file from mind-monitor code (muse 2)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SyntaxError: from simple python example file from mind-monitor code (muse 2)
#5
(Jul-16-2021, 02:24 PM)deanhystad Wrote: You need to wrap code inside python tags (use Insert Python button).

There is not a syntax error in this line if you are using Python 3.5 or newer, but it is in Python 2.7. The ": str" is a type hint. It adds information to the function signature that can be used by some tools to help with autocompletion or code analysis. Type hints like this are relatively new to Python. You have a choice of installing a newer version of Python or doing A LOT of editing. Many things have changed since Python 2.7

I just looked at the package description and it mentions the 3.5+ requirement.
Quote:Open Sound Control server and client implementations in pure python (3.5+).

If your Python 3 version is 3.5 or newer, make sure you are running the code using python3 and not python.

Thank you. I was reading and research my error and found out that python3 did not work because of my xcode is out of date so I need to upgrade it. Anyway, your comment is a confirmation that I need to use python3 thank you!
Reply


Messages In This Thread
RE: SyntaxError: from simple python example file from mind-monitor code (muse 2) - by warmcupoftea - Jul-16-2021, 02:51 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with simple code JacobSkinner 1 314 Mar-18-2024, 08:08 PM
Last Post: deanhystad
  I have a code which is very simple but still I cannot detect what's wrong with it max22 1 480 Nov-07-2023, 04:32 PM
Last Post: snippsat
  Error on import: SyntaxError: source code string cannot contain null bytes kirkwilliams2049 7 6,671 Aug-03-2023, 06:00 PM
Last Post: Gribouillis
  help me simple code result min and max number abrahimusmaximus 2 902 Nov-12-2022, 07:52 AM
Last Post: buran
  Simple encoding code ebolisa 3 1,439 Jun-18-2022, 10:59 AM
Last Post: deanhystad
  Problem with importing Python file in Visual Studio Code DXav 7 5,072 Jun-15-2022, 12:54 PM
Last Post: snippsat
  Is it possible to make a program recognize how many clicks it has had on the monitor? jao 0 1,152 Feb-25-2022, 06:31 PM
Last Post: jao
  How would you (as an python expert) make this code more efficient/simple coder_sw99 3 1,790 Feb-21-2022, 10:52 AM
Last Post: Gribouillis
  Python code to read second line from CSV files and create a master CSV file sh1704 1 2,395 Feb-13-2022, 07:13 PM
Last Post: menator01
  Simple code question about lambda and tuples JasPyt 7 3,299 Oct-04-2021, 05:18 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020