Git Product home page Git Product logo

brainworkshop's People

Contributors

adithyabsk avatar chewi avatar ingridmorstrad avatar jschueller avatar jtoomim avatar markolenik avatar mt-caret avatar plhosk avatar samcv avatar xantares avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

brainworkshop's Issues

AVBin trouble on Windows

The program starts without AVBin succsessfully (and says: "AVBin not detected. Music disabled.")
But with AVBin installed in the system it crashes (It shows a window filled with white, eats CPU and memory)

bw_fail

IDLE output:
Unexpected error loading library avbin: [WinError 193] %1 is not a valid Win32 application
Warning: Could not load AVbin. Music disabled.

This is usually due to Windows Data Execution Prevention (DEP). Due to a bug in
AVbin, a library used for decoding sound files, music is not available when DEP is enabled. To enable music, disable DEP for Brain Workshop. To simply get rid of this message, set USE_MUSIC = False in your config.ini file.

To disable DEP:

  1. Open Control Panel -> System
  2. Select Advanced System Settings
  3. Click on Performance -> Settings
  4. Click on the Data Execution Prevention tab
  5. Either select the "Turn on DEP for essential Windows programs and services only" option, or add an exception for Brain Workshop.

Press any key to continue without music support.

Traceback (most recent call last):
File "C:\Users\User\Desktop\bw_new\brainworkshop.pyw", line 4760, in
Message(msg)
File "C:\Users\User\Desktop\bw_new\brainworkshop.pyw", line 662, in init
font_name=self.fontlist_serif,
AttributeError: 'Message' object has no attribute 'fontlist_serif'

"Turn on DEP for essential Windows programs and services only" option already set.

Cannot Install Brainworkshop on Big Sur

This is a different bug from the openGL one

Tommys-Air:brainworkshop tommyodom$ python3 brainworkshop.pyw brainworkshop.pyw:44: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import random, os, sys, imp, socket, webbrowser, time, math, traceback, datetime, errno 2021-02-17 18:00:49.603 Python[45790:480356] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/gh/brszh43s1qg2rx34d_1kq1x40000gn/T/com.apple.python3.savedState Traceback (most recent call last): File "brainworkshop.pyw", line 1163, in <module> pyglet.gl.glLineWidth(calc_fontsize(2)) File "/Users/tommyodom/Library/Python/3.8/lib/python/site-packages/pyglet-2.0.dev1-py3.8.egg/pyglet/gl/lib.py", line 114, in errcheck pyglet.gl.lib.GLException: (0x501): Invalid value. A numeric argument is out of range.

Is there anything I can do?

Fullscreen in Jaeggi Mode not centered

The cross in Jaeggi Mode fullscreen is sometimes in the center, sometimes the grid is on the left half of the screen. Only option is JAEGGI_MODE=True. Can replicate it in KDE Plasma and LXDE, running Arch.

1
2

Support XDG Base Directory specification

Currently, brainworkshop on Unixes keeps data in '~/.brainworkshop` which is problematic, because it clutters home directory with dotfiles, and there is no separation between configuration, generated files like logs, etc. XDG Base Directory specification lists several places where user data could be placed, I think that article on Arch Wiki summarizes the idea pretty well. It would be great if brainworkshop could follow the specification as well.

Sound in Every Other Trial Rather Than Every Trial - Arch Linux x86_64

I'm using Arch Linux x86_64. So I installed the latest git version of
Brain Workshop 5 beta just a little while ago (like an hour ago), and it seems to work
much better than Brain Workshop 4.8.4. But there's something
mysterious that actually breaks the game entirely: I hear sound in
every other trial rather than every trial. I can't imagine why. It
looks like everything installed properly. I installed this package
using the Arch Linux AUR brainworkshop-git package.

Any suggestions? Any further information I can provide?

Menu arrow and new user problem

Hi, I used Python 3.11 and downloaded sourceCode and I get below errors;
When I tried to create a new user;
2023-05-30 13 33 11

The menu arrow are not shown,
2023-05-30 13 32 14

I will be grateful if you could help me
Thanks

App automatically reverts from manual to non-manual mode after one session

The app is automatically reverting from manual to non-manual mode after one session of manual mode. This started happening after I updated master from commit ea817f7 to tag v5.0. To remedy, I checked out commit ea817f7 again. I'm running the app on MacBook Pro 2018 v10.15.4.

To reproduce:
Start the app.
Switch to manual mode.
Play a session.
When the session is complete, notice that the app no longer says "Manual mode: ..." at the top of the window.
Expected: The app should continue in manual mode until explicitly switched to non-manual mode by the user.

Automated builds / packages

The application used to be downloadable as pre-built packages.

We should be able to use GitHub actions and build these releases in docker perhaps, making non-source downloads available.

I can help with the GitHub automation side if someone else wants to help with how to build / package the releases.

Relatively Serious Crashing Problem

Hi,

I'm running Arch Linux x86_64 at a relatively recent update with the git archive from this week. I am running into a relatively serious crashing problem. I am playing standard mode, and it crashes about 33% to 40% of the time based on 20 trials. I don't know if it has something to do with avbin not working properly (since I don't hear music, despite the fact that I did install avbin7 from the AUR) or if it's something else. Is there a log that I can provide that can help provide insight into this problem? It's very important to me that brainworkshop works well on Arch Linux and it makes very much sense to me that this version of the software works well in general.

Keep in mind that I say "relatively", when I refer to the severity of the problem, since my progress in the game actually is saved after each trial, despite the fact that it crashes.

Please note, also, that I have tested the software from the Arch Linux AUR package and through the vanilla Linux tarball on this site. Both exhibit the same problem, so it's not an Arch Linux AUR packaging issue.

Thank you very much,

Timothy Beryl Grahek

pyglet 1.5.0 breaks the game on Fedora 31

On Fedora 31 installing pyglet via pip install will install pyglet 1.5.0.
This will cause the sound to only happen on every second tick, among other confusions.

The workaround is simple: pip install pyglet==1.4.0 --user - this will also install future, libfuturize, past and libpasteurize in $HOME/.local/lib/$PYTHONVERSION/site-packages. You can just copy all the folders from there to the game folder and everything works like a charm.

For now I had no time to debug this deeper. If this is an issue for more people I might be inclined to do it.

Rare Repeat Audio Occurrences

Hi,

I believe this is an issue that hasn't been posted before, although perhaps it could be an issue that is known that has never been fixed in versions before the fork. When I spend time using Brain Workshop, when I hear the sound of a letter, on rare occasions, the sound is repeated: for example, instead of "S", I hear "S--S"; so, I heard an "S" shortly after the first "S" but it still counts as one instance. So it's a sound glitch, from what I understand. The interesting thing is that when this happens, the second time you hear the letter, it's almost like micro seconds of the sound of the second time are cut off.

Please note that I am using Arch Linux x86_64, and I am using Pyglet installed from pip; I'm using an Arch AUR package compiled from a recent git clone.

Thank you very much for your time.

wtf is wrong with my system....

Hi. For some goddamn idiotic reason, my Fedora 38 system just wont run this with any python.
AVBin is missing, but it should run anyway. (Fucking building only results in: "cant find avbin.so file" during install.sh step.)

With Python3:

python3 brainworkshop.pyw File "..../brainworkshop/brainworkshop.pyw", line 732 print _('AVBin not detected. Music disabled.') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

I checked for pyglet, its >2.0, the repo-search cant find "futurize", anything relevant to "past" and "future" and fedora is shit.
Python2, just results in a black window, then Seg fault.

Can't Run BrainWorkshop on Arch Linux

Hello,

I used to have BrainWorkshop working on Linux, but now, after it's been several months (maybe even a year or two), it isn't working anymore. I decided to fetch the latest copy and follow the latest instructions, but I can't seem to get it to work even so.

The following is the data I have collected for your reference:

[alchemek@### brainworkshop-master]$ ls -l
total 280
-rw-r--r-- 1 alchemek alchemek 17895 Nov 28 02:19 LICENSE.md
-rw-r--r-- 1 alchemek alchemek 7783 Nov 28 02:19 Readme-instructions.txt
-rw-r--r-- 1 alchemek alchemek 2320 Nov 28 02:19 Readme-resources.txt
-rw-r--r-- 1 alchemek alchemek 19156 Nov 28 02:19 Readme.md
-rw-r--r-- 1 alchemek alchemek 1016 Nov 28 02:19 appveyor.yml
-rw-r--r-- 1 alchemek alchemek 197 Nov 28 02:19 brainworkshop.desktop
-rw-r--r-- 1 alchemek alchemek 191805 Nov 28 02:19 brainworkshop.py
drwx------ 2 alchemek alchemek 4096 Nov 28 02:19 data
drwx------ 9 alchemek alchemek 4096 Nov 29 22:28 future
drwx------ 3 alchemek alchemek 4096 Nov 29 22:28 libfuturize
drwx------ 6 alchemek alchemek 4096 Nov 29 22:28 past
drwxr-xr-x 10 alchemek alchemek 4096 Mar 20 18:30 pyglet
-rw-r--r-- 1 alchemek alchemek 30 Nov 28 02:19 requirements.txt
drwx------ 7 alchemek alchemek 4096 Nov 28 02:19 res
drwx------ 2 alchemek alchemek 4096 Nov 28 02:19 tools

[alchemek@### brainworkshop-master]$ python brainworkshop.py
No suitable audio driver could be loaded.
Full text of error:
Traceback (most recent call last):
File "/home/alchemek/Apps/brainworkshop-master/brainworkshop.py", line 922, in
import pyglet.media
File "/usr/lib/python3.10/site-packages/pyglet/media/init.py", line 143, in
add_default_media_codecs()
File "/usr/lib/python3.10/site-packages/pyglet/media/codecs/init.py", line 102, in add_default_media_codecs
if have_ffmpeg():
File "/usr/lib/python3.10/site-packages/pyglet/media/codecs/init.py", line 118, in have_ffmpeg
from . import ffmpeg_lib
File "/usr/lib/python3.10/site-packages/pyglet/media/codecs/ffmpeg_lib/init.py", line 36, in
from .libavcodec import *
File "/usr/lib/python3.10/site-packages/pyglet/media/codecs/ffmpeg_lib/libavcodec.py", line 46, in
from . import libavutil
File "/usr/lib/python3.10/site-packages/pyglet/media/codecs/ffmpeg_lib/libavutil.py", line 206, in
avutil.av_frame_get_best_effort_timestamp.restype = c_int64
File "/usr/lib/python3.10/ctypes/init.py", line 387, in getattr
func = self.getitem(name)
File "/usr/lib/python3.10/ctypes/init.py", line 392, in getitem
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/lib/libavutil.so.57: undefined symbol: av_frame_get_best_effort_timestamp
Exception ignored in atexit callback: <function _delete_audio_driver at 0x7f115114e440>
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/pyglet/media/drivers/init.py", line 102, in _delete_audio_driver
from .. import Source
File "/usr/lib/python3.10/site-packages/pyglet/media/init.py", line 143, in
add_default_media_codecs()
File "/usr/lib/python3.10/site-packages/pyglet/media/codecs/init.py", line 102, in add_default_media_codecs
if have_ffmpeg():
File "/usr/lib/python3.10/site-packages/pyglet/media/codecs/init.py", line 118, in have_ffmpeg
from . import ffmpeg_lib
File "/usr/lib/python3.10/site-packages/pyglet/media/codecs/ffmpeg_lib/init.py", line 36, in
from .libavcodec import *
File "/usr/lib/python3.10/site-packages/pyglet/media/codecs/ffmpeg_lib/libavcodec.py", line 46, in
from . import libavutil
File "/usr/lib/python3.10/site-packages/pyglet/media/codecs/ffmpeg_lib/libavutil.py", line 206, in
avutil.av_frame_get_best_effort_timestamp.restype = c_int64
File "/usr/lib/python3.10/ctypes/init.py", line 387, in getattr
func = self.getitem(name)
File "/usr/lib/python3.10/ctypes/init.py", line 392, in getitem
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/lib/libavutil.so.57: undefined symbol: av_frame_get_best_effort_timestamp

Any ideas?

Pyglet 2.x "Invalid value" exception

I'm getting an error when I run

python3 /Users/bayo/dev/brainworkshop-5/brainworkshop.py

Traceback (most recent call last):
  File "/Users/bayo/dev/brainworkshop-5/brainworkshop.py", line 1174, in <module>
    pyglet.gl.glLineWidth(calc_fontsize(2))
  File "/Users/bayo/dev/brainworkshop-5/pyglet/gl/lib.py", line 114, in errcheck
    raise GLException('(0x%x): %s' % (error, msg))
pyglet.gl.lib.GLException: (0x501): Invalid value. A numeric argument is out of range.

To resolve, I followed these instructions in the README, but no success:

Copy the following folders into the brainworkshop folder: past, future and libfuturize. You can get those here: https://github.com/PythonCharmers/python-future
Copy the pyglet module into a pyglet folder. You can get pyglet here: http://www.pyglet.org/

> Python3 -V
> Python 3.10.8

I have pyglet 2.0.0 installed.

pip3 install --upgrade pyglet==2.0.0

Any assistance would be greatly appreciated. Thank you!

App crashes when it is supposed to play sound

I am using Ubuntu 18.04, with python three, all the libraries installed, AvBin and also future, past, libfuturize.
On the first trial, when it is supposed to play a letter sound it suddenly crashes.
I tried to debug it and i get:
image

[Pyglet 2.0] AttributeError: 'Batch' object has no attribute 'add'

Since my distro has upgraded to Pyglet 2.0, Brainworkshop won't start and gives the following error:

$ brainworkshop                                                                                                                                                                                                                                         
Error creating test polygon. Full text of error:

Full text of error:
Traceback (most recent call last):
  File "/usr/share/brainworkshop/brainworkshop.py", line 4676, in <module>
    test_polygon = batch.add(4, pyglet.gl.GL_QUADS, None, ('v2i', (
AttributeError: 'Batch' object has no attribute 'add'

This is due to a known breaking change. See https://pyglet.readthedocs.io/en/latest/programming_guide/migration.html#graphics-module

Where is config.ini?

Is configuration still controlled via a config.ini in the data folder? I've tried changing the configuration by putting a config.iniindataand in the root folder. And I've tried modifying settings inbrainworkshop.pyw`. But, strangely, this seems to have no effect.

I can't find the stats file either. According to Readme-stats.txt, it should be in the data folder as well.

Thanks!

App spoils the solution

Whenever I miss the correct position or letter sound the text on the bottom: "Left-click..." or "Right-click..." turns blue right at the end of the 3 seconds, see attached picture. I have been using the app for a week now and I think that this bug only appeared yesterday. This behavior is very distracting, even though I would like an immediate feedback I don't want to spoil the missed positions. A workaround is to hide the text, but then there is no immediate feedback anymore.
brainworkshop

Port to mobile

How much interest has there been in porting Brain Workshop to iOS/Android? Have there been any attempts?

GAME_MODE in config.ini does not work

Windows 10

Tested with 5.02 & the old 4.8.4 -- neither work.

To reproduce:

  • In the configuration file, change: "GAME_MODE = " to any of the possible values provided.
  • What happens: Default starting game mode does not change; it's always Dual N Back. Setting doesn't work.
  • Expected behavior: Example, "GAME_MODE = 8" Pressing SPACE to start the workshop should start in Dual Arithmetic Mode

Segmentation fault (core dumped)

When I want to run the following command, a black screen appears and closes. Then, the terminal shows Segmentation fault (core dumped) error.
The command:
python2 brainworkshop.pyw
The result of the pip2 list command is:

Package      Version
------------ -------
folder-color 0.0.86
pip          20.3.4
pyglet       1.5.15
PyGObject    3.36.0
setuptools   44.1.0
urllib3      1.26.4
wheel        0.34.2

I have also installed "AVbin" from here. And I can see the the installed OpenGL version using glxinfo | grep "OpenGL version" command. The result is:
OpenGL version string: 4.6.0 NVIDIA 450.102.04

How to only count "Correct" and ignore misses

Hi, I need to set up BW to only count correct answers and ignore "misses" (when there was no input) because negative feedback was frustrating, lol.

Ive been [toying with] the code but [after making changes and testing] the program crashes on finishing a session.

I don't really know where to start, line 3202 in ***.pyw is: # this controls the statistics which display upon completion of a session.
but so far commenting out lines with "wrongs" breaks the code. Any assistance would be much appreciated.

Also this section seems to define no input I believe:

def check_match(input_type, check_missed = False):
    current = 0
    back_data = ''
    operation = 0
    # FIXME:  I'm not going to think about whether crab_back will work with
    # cfg.VARIABLE_NBACK yet, since I don't actually understand how the latter works

    if mode.flags[mode.mode]['crab'] == 1:
        back = 1 + 2*((mode.trial_number-1) % mode.back)
    else:
        back = mode.back

    if cfg.VARIABLE_NBACK:
        nback_trial = mode.trial_number - mode.variable_list[mode.trial_number - back - 1] - 1
    else:
        nback_trial = mode.trial_number - back - 1

    if len(stats.session['position1']) < mode.back:
        return 'unknown'

    if   input_type in ('visvis', 'visaudio', 'image'):
        current = mode.current_stim['vis']
    elif input_type in ('audiovis', ):
        current = mode.current_stim['audio']
    if   input_type in ('visvis', 'audiovis', 'image'):
        back_data = 'vis'
    elif input_type in ('visaudio', ):
        back_data = 'audio'
    elif input_type is 'arithmetic':
        current = mode.current_stim['number']
        back_data = stats.session['numbers'][nback_trial]
        operation = mode.current_operation
    else:
        current = mode.current_stim[input_type]
        back_data = input_type

    if input_type == 'arithmetic':
        if operation == 'add':
            correct_answer = back_data + current
        elif operation == 'subtract':
            correct_answer = back_data - current
        elif operation == 'multiply':
            correct_answer = back_data * current
        elif operation == 'divide':
            correct_answer = Decimal(back_data) / Decimal(current)
        if correct_answer == arithmeticAnswerLabel.parse_answer():
            return 'correct'
    else:
        # Catch accesses past list end
        try:
            if current == stats.session[back_data][nback_trial]:
                if check_missed:
                    return 'missed'
                else:
                    return 'correct'
        except Exception as e:
            print(e)
            return 'incorrect'
    return 'incorrect'

What I wanted at the time was no negative feedback on incorrect guesses (the text blinking in red] and that the incorrect guesses didnt add to the final score.

ogg Music Files Not Playing

I'm setting up a new Mac and was able to port brain-workshop to an M1 Mac Mini running Monterey. Everything is excellent, even importing my previous stats so I'm not having to start all over again. (Library > Application Support > Brain Workshop > data > stats.txt)
The letter name wav files play fine, but I can't get res/music/advance/Concert.ogg (etc) to play. I tried swapping them out with wav versions but still no luck playing the music between rounds.
Thanks!

Update the deprecated version for getting the display via Pyglet

Since the current version used for getting the screen via pyglet is deprecated, for users who want to play it on fullscreen this would not work.

You can replace the old version with a new one suggested by pyglet.
Old version: line 1176

if cfg.WINDOW_FULLSCREEN:
    screen = pyglet.window.get_platform().get_default_display().get_default_screen()

New version:

if cfg.WINDOW_FULLSCREEN:
    screen = pyglet.canvas.get_display().get_default_screen()

Crashes when entering 'choose game mode'

This is similar to issue #48

(For some reason, github removes the line-breaks in the output, so I removed the code-brackets.)

log:
./brainworkshop.py
Traceback (most recent call last):
File "/home/user/Downloads/brainworkshop-master/./brainworkshop.py", line 4820, in
pyglet.app.run()
File "/usr/lib/python3.10/site-packages/pyglet/app/init.py", line 107, in run
event_loop.run(interval)
File "/usr/lib/python3.10/site-packages/pyglet/app/base.py", line 187, in run
timeout = self.idle()
File "/usr/lib/python3.10/site-packages/pyglet/app/base.py", line 248, in idle
self.clock.call_scheduled_functions(dt)
File "/usr/lib/python3.10/site-packages/pyglet/clock.py", line 262, in call_scheduled_functions
item.func(now - item.last_ts, *item.args, **item.kwargs)
File "/usr/lib/python3.10/site-packages/pyglet/app/base.py", line 154, in _redraw_windows
window.dispatch_event('on_draw')
File "/usr/lib/python3.10/site-packages/pyglet/window/init.py", line 1363, in dispatch_event
super().dispatch_event(*args)
File "/usr/lib/python3.10/site-packages/pyglet/event.py", line 415, in dispatch_event
if handler(*args):
File "/home/user/Downloads/brainworkshop-master/./brainworkshop.py", line 4646, in on_draw
graph.draw()
File "/home/user/Downloads/brainworkshop-master/./brainworkshop.py", line 1590, in draw
self.create_batch()
File "/home/user/Downloads/brainworkshop-master/./brainworkshop.py", line 1622, in create_batch
self.batch.add(3, pyglet.gl.GL_LINE_STRIP,
AttributeError: 'Batch' object has no attribute 'add'

pip is version:

pip install pyglet Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: pyglet in /usr/lib/python3.10/site-packages (2.0.1)

distro is Manjaro

Graph of Manual History

Currently, it's not possible to see a graph of sessions done in manual mode. It would be great to have this option, as I practice exclusively in manual mode.

No sound in Ubuntu 22.04

The app works great except for one thing, it has no sound. The letters cannot be heard and I don't understand why. I get no errors no nothing.

Will not start in Linux Mint 18.x based Ubuntu 16.04?

Hi Samcv,

Thanks for forking this into version 5 for Python 2 and 3 and updating it.

Unfortunately, I cannot get this to work in my Linux Mint 18.x based Ubuntu 16.04.

Some people in the Linux Mint forum would like to use "Brainworkshop" and could not get it to work, then I found your fork "Brainworkshop 5", and I cannot get it to load. I have installed all the dependencies I think. Does this still use the "avbin" like the older one because I installed that too?

These are the results from my console terminal using either python or python3.

`python brainworkshop.pyw
Warning: Could not load AVbin. Music disabled.

This is usually due to Windows Data Execution Prevention (DEP). Due to a bug in
AVbin, a library used for decoding sound files, music is not available when DEP is enabled. To enable music, disable DEP for Brain Workshop. To simply get rid of this message, set USE_MUSIC = False in your config.ini file.

To disable DEP:

  1. Open Control Panel -> System
  2. Select Advanced System Settings
  3. Click on Performance -> Settings
  4. Click on the Data Execution Prevention tab
  5. Either select the "Turn on DEP for essential Windows programs and services only" option, or add an exception for Brain Workshop.

Press any key to continue without music support.

Exception AttributeError: "'FFmpegSource' object has no attribute '_packet'" in <bound method FFmpegSource.del of <pyglet.media.codecs.ffmpeg.FFmpegSource object at 0x7fc7c3d63110>> ignored
Traceback (most recent call last):
File "brainworkshop.pyw", line 4735, in
brain_icon.set_position(field.center_x - brain_icon.width//2,
AttributeError: 'Sprite' object has no attribute 'set_position'
`

Best regards,
Phil (phd21)
[email protected]

Can't run Brainworkshop after updating Mac OS to Big Sur

Hi,

I'm unable to run Brainworkshop after updating Mac OS to Big Sur.

Below is the error I get.

Any fixes or workarounds for this?

Thanks much!

/Users/bayo/dev/brainworkshop-5/brainworkshop.pyw:44: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import random, os, sys, imp, socket, webbrowser, time, math, traceback, datetime, errno
Error: unable to load pyglet. If you already installed pyglet, please ensure ctypes is installed. Please visit http://pyglet.org
Full text of error:
Traceback (most recent call last):
File "/Users/bayo/dev/brainworkshop-5/brainworkshop.pyw", line 905, in
from pyglet.gl import *
File "/usr/local/lib/python3.8/site-packages/pyglet/gl/init.py", line 95, in
from pyglet.gl.lib import GLException
File "/usr/local/lib/python3.8/site-packages/pyglet/gl/lib.py", line 147, in
from pyglet.gl.lib_agl import link_GL, link_GLU, link_AGL
File "/usr/local/lib/python3.8/site-packages/pyglet/gl/lib_agl.py", line 43, in
gl_lib = pyglet.lib.load_library(framework='/System/Library/Frameworks/OpenGL.framework')
File "/usr/local/lib/python3.8/site-packages/pyglet/lib.py", line 124, in load_library
return self.load_framework(kwargs['framework'])
File "/usr/local/lib/python3.8/site-packages/pyglet/lib.py", line 279, in load_framework
raise ImportError("Can't find framework %s." % path)
ImportError: Can't find framework /System/Library/Frameworks/OpenGL.framework.

Error when navigating to graph view

I'm using the latest commit on master.
When in regular (non-manual) mode, and I tap G to see the graph view of performance, the app exits and I get this error in the console:

2023-01-01 11:19:58.217 Python[54254:3765688] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/34/vs3gz3zn02sbkz6z556qyszw0000gn/T/org.python.python.savedState
Traceback (most recent call last):
  File "/Users/bayo/dev/brainworkshop-5/brainworkshop.py", line 4820, in <module>
    pyglet.app.run()
  File "/opt/homebrew/lib/python3.10/site-packages/pyglet/app/__init__.py", line 107, in run
    event_loop.run(interval)
  File "/opt/homebrew/lib/python3.10/site-packages/pyglet/app/base.py", line 186, in run
    timeout = self.idle()
  File "/opt/homebrew/lib/python3.10/site-packages/pyglet/app/base.py", line 247, in idle
    self.clock.call_scheduled_functions(dt)
  File "/opt/homebrew/lib/python3.10/site-packages/pyglet/clock.py", line 262, in call_scheduled_functions
    item.func(now - item.last_ts, *item.args, **item.kwargs)
  File "/opt/homebrew/lib/python3.10/site-packages/pyglet/app/base.py", line 153, in _redraw_windows
    window.dispatch_event('on_draw')
  File "/opt/homebrew/lib/python3.10/site-packages/pyglet/window/__init__.py", line 1363, in dispatch_event
    super().dispatch_event(*args)
  File "/opt/homebrew/lib/python3.10/site-packages/pyglet/event.py", line 415, in dispatch_event
    if handler(*args):
  File "/Users/bayo/dev/brainworkshop-5/brainworkshop.py", line 4646, in on_draw
    graph.draw()
  File "/Users/bayo/dev/brainworkshop-5/brainworkshop.py", line 1590, in draw
    self.create_batch()
  File "/Users/bayo/dev/brainworkshop-5/brainworkshop.py", line 1622, in create_batch
    self.batch.add(3, pyglet.gl.GL_LINE_STRIP,
AttributeError: 'Batch' object has no attribute 'add'

Which license the project uses is unclear. Proposal to license as GPLv2 or later

The project's code is nominally under GPL licensing as stated in brainworkshop.py

 Copyright (C) 2009-2011: Paul Hoskinson ([email protected])
#
# The code is GPL licensed (https://www.gnu.org/copyleft/gpl.html)

The GPL page linked says that if no version is specified, you should interpret that any any GPL version you wish. I believe we should standardize on "GPLv2 or later".

Reasons for using GPLv2 or later and not GPLv3: GPLv3's text is twice as long and more complicated. I don't think the GPLv3 additions improve this project specifically, and by setting it as GPLv2 or later, the code will still be able to be integrated into GPLv3 projects of others.

We should also add additional copyright for @xantares and @samcv to the header of the file. I am willing to make these changes, but wanted to get confirmation that @xantares is okay with these changes, and I will go ahead and add a LICENSE file to the project and copyright information to the header. I will probably also update some of the header's outdated information while still referring to the original project our fork is based on.

Sound issue

Hello, I've had some issues running brainworkshop on lubuntu recently.
Not sure how to fix the issue, everything was working fine on debian.
Searching didn't yield any results.

Additional instructions for running on linux

When trying to run brainworkshop, I got the following error:

/usr/bin/env: ‘python’: No such file or directory

My not particularly qualified guess is that ‘python’ is called rather than ‘python3’ because both python 2 and 3 are supported?
Anyway, my suggestion is that the readme should mention that it might be necessary to link python to python3 by:

a) Checking that python is installed and where it is by running: whereis python3 / whereis python2 /depending on the installed version of python).

b) Creating a symlink to the version of python on the system: sudo ln -s /usr/bin/python3 /usr/bin/python/ sudo ln -s /usr/bin/python2 /usr/bin/python

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.