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)
#1
Sad 
I am working on a project using Muse 2, the brain wave detector. And I found the very simple code by James from mind-monitor.com and the app.
It looks pretty straight forward but somehow my Mac terminal cannot run it. This code should get the data from the app on my ipad/iphone via OSC and shown the visual graph.

I have posted this issue on the forum of https://mind-monitor.com/forums/viewforum.php?f=15
but they suggested I ask someone who knows python more. So here I am.

so..
The github of the example code is here:
https://github.com/Enigma644/MindMonitorPython

The code I'm trying is this one called "OSC Receiver Simple.py", which the URL is here:
https://github.com/Enigma644/MindMonitor...0Simple.py


I had changed the file name since the terminal says it cannot fine 'OSC' alone so I changed it to OSC-Receiver-Simple.py
Then, I got this error:

Error:
File "OSC-Receiver-Simple.py", line 13 def eeg_handler(address: str,*args): ^ SyntaxError: invalid syntax

NOTE* I can't put code snippet here. IDK why it is always shown as simple text. But anyway, the ^ of the error is shown at : aka colon.


I'm running on Mac
MacBook Pro (Retina, 15-inch, Mid 2014) Catalina 10.15.7
with python python2 2.7 and 3
and I already have that pip and done the "pip install python-osc"

Any suggestion of what might happen?
Thanks in advance.
Reply


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

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with simple code JacobSkinner 1 310 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 476 Nov-07-2023, 04:32 PM
Last Post: snippsat
  Error on import: SyntaxError: source code string cannot contain null bytes kirkwilliams2049 7 6,649 Aug-03-2023, 06:00 PM
Last Post: Gribouillis
  help me simple code result min and max number abrahimusmaximus 2 901 Nov-12-2022, 07:52 AM
Last Post: buran
  Simple encoding code ebolisa 3 1,436 Jun-18-2022, 10:59 AM
Last Post: deanhystad
  Problem with importing Python file in Visual Studio Code DXav 7 5,063 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,151 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,788 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,296 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