Error converting muse file to all other types


#1

I can’t get the muse-player to convert to either .mat or .csv. I get the following error regardless of which one I try :

Traceback (most recent call last):
File “/Users/Shared/Jenkins/Home/jobs/MusePlayer-MacOS-1.8.x/workspace/build/muse-player/out00-PYZ.pyz/threading”, line 810, in __bootstrap_inner
File “/Users/Shared/Jenkins/Home/jobs/MusePlayer-MacOS-1.8.x/workspace/build/muse-player/out00-PYZ.pyz/threading”, line 763, in run
File “/Users/Shared/Jenkins/Home/jobs/MusePlayer-MacOS-1.8.x/workspace/build/muse-player/out00-PYZ.pyz/proto_reader_v2”, line 56, in parse
File “/Users/Shared/Jenkins/Home/jobs/MusePlayer-MacOS-1.8.x/workspace/build/muse-player/out00-PYZ.pyz/proto_reader_v2”, line 104, in handle_data
File “/Users/Shared/Jenkins/Home/jobs/MusePlayer-MacOS-1.8.x/workspace/build/muse-player/out00-PYZ.pyz/proto_reader_v2”, line 195, in handle_annotation
ValueError: invalid literal for int() with base 10: ‘FP1’


#2

I am having a similar problem, except I’m on windows 8.1, so the file paths start with D:\Jenkins, but effectively, the same error…it generates a 0 byte/empty file. I’m also trying to convert from csv to either .muse or .mat - but same error.

I have the 2016 headband and used muse monitor to save the csv file, here’s a copy of my command-line output:

C:\Users\REDACTED\Desktop>muse-player -f museMonitor_2017-02-05--20-08-59_21130
45415.csv -F museMonitor_2017-02-05--20-08-59_2113045415.muse
Muse Player 1.8.4
Input:
  * Muse file(s): ['museMonitor_2017-02-05--20-08-59_2113045415.csv']

Output:
  * Muse file: museMonitor_2017-02-05--20-08-59_2113045415.muse
Exception in thread Thread-1:
Traceback (most recent call last):
  File "D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.
pyz\threading", line 810, in __bootstrap_inner
  File "D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.
pyz\threading", line 763, in run
  File "D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.
pyz\input_handler", line 120, in parse_files
  File "D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.
pyz\input_handler", line 149, in __parse_head
IndexError: list index out of range



Aborted.

I had to ctrl+c to get it to abort, otherwise, it just hangs there and nothing happens. Any ideas on how to fix this? I thought that the Muse Monitor app outputs compatible csv files for muse-player?

When I try to have it stream to osc.udp://localhost:5001 here’s what happens:

C:\Users\REDACTED\Desktop>muse-player -f museMonitor_2017-02-05--20-08-59_21130
45415.csv -s osc.udp://localhost:5001
Muse Player 1.8.4
Input:
  * Muse file(s): ['museMonitor_2017-02-05--20-08-59_2113045415.csv']

Output:
  * OSC output stream URL: osc.udp://localhost:5001
Exception in thread Thread-1:
Traceback (most recent call last):
  File "D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.
pyz\threading", line 810, in __bootstrap_inner
  File "D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.
pyz\threading", line 763, in run
  File "D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.
pyz\input_handler", line 120, in parse_files
  File "D:\Jenkins\workspace\MusePlayer-Win32-1.8.x\build\muse-player\out00-PYZ.
pyz\input_handler", line 149, in __parse_head
IndexError: list index out of range

Playback Time: 1486347434.1s : Gap in Data

The line that reads “Playback Time” shows the numbers increasing, as if it is, in fact, parsing the CSV file, however, in muse-lab with udp port 5001 open, with a config file loaded, shows as if it’s not receiving any data at all.

I was able to connect muse monitor to stream live data to muse-lab with no issue, so really not sure why none of this is working…am I missing something? Anyone, please…help!!


Error converting to .mat files
#3

Quick follow-up, I downloaded this person’s .muse file from this post: Muse Player Python error while converting to Matlab

And tried using muse-player with the following command:

C:\Users\shaya_000\Desktop>muse-player -f data.muse -s osc.udp://localhost:5000
Muse Player 1.8.4
Input:
  * Muse file(s): ['data.muse']

Output:
  * OSC output stream URL: osc.udp://localhost:5000
Playback Time: 94.0s : Sending Data

Ran muse-lab listening on UDP 5000 and it worked just fine! Apparently, the csv generated by Muse Monitor may have issues? I’m going to try a recording with Muse Monitor and have it save as native .muse and I’ll try to stream it that way… Stay tuned y’all…


#4

OK! So, I just did a short 20 second recording using Muse Monitor and changed the settings to save it as a .muse file instead of .csv, and muse-player was able to stream it with no errors. So, not sure who needs to look into this, dunno if @Enigma644 knows anything about this or if the Muse devs can figure this out…


#5

Muse Player can only covert to and from it’s own very specific CSV format.

The Muse Player CSV format has every entry on a separate line which makes it impossible to graph in Excel, so I designed a better CSV format for Muse Monitor specifically to make graphing easier.

If you want to use Muse Player, select the “Muse” (Google Protocol Buffer) format in the Muse Monitor recording settings.


#6

Yup! That’s what I did!! Thanks for the follow-up :slight_smile: Hadn’t realized that Muse Monitor’s CSV format was different from what muse-player is expecting to parse.

I had already disabled the CSV output in the settings. I don’t suppose it would be possible in an update to the app to have a toggle setting to output csv in muse’s format, vs your pared-down version?

Just thinking out loud…


#7

Sorry, no! I want Muse Monitor to be as user friendly as possible. :wink:

The Muse Player format is the “pared-down” one. It’s incredibly simplistic, with each row just having the value and the type. The problem with this is that ALL values for every data type are in the same column. This is easy enough for a program such as Muse Player to process, but for any normal user opening this in Excel, it’s completely unintelligible and not something I’d ever want my users to see!

The Muse Monitor CSV format has a separate column for each data type, making it easy to view by a human and more importantly, easy to graph with Excels’s built in graphing functions.

If you really want a Muse Player compatible CSV file, then you can convert from Muse Monitor’s Muse format to Muse Player’s with a Muse Player conversion command like this:
muse-player.exe -v -f muse_monitor_data.muse -C outData.csv
… but I’ve no idea why you’d want to do that! :wink:


#8

:joy: LOL totally understood! Many thanks :smiley:


#9

HI,

I am still having this issue. I tried streaming the data on Muselab and just like Shayaknyc it is as if there is no data. The Playback Time is increasing but it also says “Gap in Data”. My original file is a muse file (It was unfortunately not me who saved this data in the first place so I can’t comment on how it was saved etc) but I can’t convert it using muse-player or even look at the data on muselab. Anyone have any suggestions?

The command I’m using to is
muse-player -f day2-session1.muse -s osc.tcp://localhost:5000


#10

Convert you muse recording to text and have a look in notepad to see what you actually have in there:
muse-player.exe -q -v -f data.muse -O test.txt

You should see many lines with stuff like:
1486413522.957334 /muse/eeg fffff 390.439575 87.435898 6.446887 62.857143 74.139191
The number on the left is the timestamp in seconds.


#11

I get the same error as I had in the first place when I try to do that and I have to abort it. The file that it creates has only a small amount written in it but it looks like it should.

thanks again for you help!