Comments (3)
Thanks for the heads-up!
I'm not quite sure what the best behaviour would be. PyGaze could automatically split up the message into more than one string, but this would result in odd log entries. Alternatively, we could print a warning to the console, but this would likely be missed. Finally, we could throw an exception when someone tries to log more than 128 characters, but image this happening in the middle of an experiment: you wouldn't really care that the entire message wasn't logged, but would be royally ticked off by the unexpected crash.
What do you think?
from pygaze.
Hi Edwin,
I think the best option would be to split the message into more than one text line. Log entries would become a bit odd, but then again I think it's fine if people know what to expect. So there could be a clear warning and explanation in the help section for this function. Analyzing the eyelink logfile is a manual endeavour anyway (at least making scripts etc), so I don't think having to retrieve a variable from multiple lines would impose that much more of a hassle.
And yes, you would be ticked off if the experiment crashes halfway through; but on the other hand you would at least know, and make sure everything goes right after your pilot participant. Can you imagine how ticked off you would be if you never got that warning or crash, only to find out you lost important data after 30 participants? :p
CheersJosh
Date: Thu, 30 Apr 2015 03:07:32 -0700
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [PyGaze] Logging long variables (e.g. lists) to the edf file (#35)
Thanks for the heads-up!
I'm not quite sure what the best behaviour would be. PyGaze could automatically split up the message into more than one string, but this would result in odd log entries. Alternatively, we could print a warning to the console, but this would likely be missed. Finally, we could throw an exception when someone tries to log more than 128 characters, but image this happening in the middle of an experiment: you wouldn't really care that the entire message wasn't logged, but would be royally ticked off by the unexpected crash.
What do you think?
—
Reply to this email directly or view it on GitHub.
from pygaze.
By the way, if we're going to fix up the log()
function anyway, it would be a nice occasion to fix two other annoying things:
- Make sure that it's unicode safe, which means converting all
str
objects to unicode before passing them on topylink
. We would have to assume a default encoding forstr
objects (utf-8
probably), and mention this in the docs. This should both work:
exp.pygaze_eyetracker.log(u'été')
exp.pygaze_eyetracker.log('été') # Assuming utf-8
- Quoting and escaping the log message would help during parsing. Right now you get:
MSG [TIMESTAMP] Some long string with "quotes"
Which could become:
MSG [TIMESTAMP] "Some long string with \"quotes\""
What do you think? It's not necessary, but it's a nice touch.
from pygaze.
Related Issues (20)
- libsmi HOT 1
- Can PyGaze use in Tobii EyeTracker 4C(Consumer Eye Trackers)?
- Exception: The setting "TRACKERSERIALNUMBER" does not exist HOT 1
- Inescapable frozen grey screen on eyetracking examples HOT 1
- Eyelink fixations map to unexpected values with 2560x1440p display HOT 2
- Add PyGaze to Open Neuroscience
- Eyelink 1000+ feed not shown in Eyelink menu / opensesame pygaze init item HOT 3
- time.clock depreciated HOT 2
- How to produce eye data file HOT 5
- FileNotFoundError: Could not find module 'iViewXAPI.dll' (or one of its dependencies). Try using the full path with constructor syntax. HOT 1
- Does PyGaze support tobii eye tracker 5? HOT 1
- AttributeError: module 'pylink.__version__' has no attribute 'split' HOT 2
- Could not find module 'iViewXAPI.dll' (or one of its dependencies). Try using the full path with constructor syntax. HOT 1
- Log messages in OpenGaze / GazePoint HOT 5
- Working example for Mac using webcam HOT 2
- tobii eyetrackers
- PyGaze missing package lxml for GazePoint
- PyGaze error in OpenSesame using GazePoint
- Tobii eye tracker has lots of temporal noise and missing samples HOT 2
- Converting Eyelink / Pygaze coordinates to be "compatible" with OS coordinate system
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygaze.