Skip to content

version extraction issue with macOS 15.5 #12

@mabiede

Description

@mabiede

The Edf2Mat converter tries to load edfimporter_pre11 on the macOS 15.5 (on Apple Silicon).

  • as the os version is '15.5' the toolbox shouldn't change the converter to be _pre11

Error message

Unrecognized function or variable 'edfimporter_pre11'.

Error in Edf2Mat>@(varargin)edfimporter_pre11(varargin{:}) (line 364)
                       importer = @(varargin)edfimporter_pre11(varargin{:});
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in Edf2Mat/processFile (line 367)
                obj.RawEdf      = importer(obj.filename);
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in Edf2Mat (line 315)
                obj.processFile();

Workaround

There are two workarounds depending on how good you feel:

  • Remove the version check on macOS (change the processFile function to the following):
        function processFile(obj)
            importer = @(varargin)edfimporter(varargin{:});
            if ~obj.oldProcedure  
                obj.RawEdf      = importer(obj.filename);
                obj.Header.raw  = obj.RawEdf.HEADER;
                obj.Samples     = obj.RawEdf.FSAMPLE;
            end
            
            obj.convertSamples();
            obj.createHeader();
            obj.convertEvents();
            if obj.verbose
                disp('Edf succesfully converted, processed.!');
            end
    
        end
  • Change the OS version to hardcoded (see code line here)
    % from
    [~, version] = unix('sw_vers -productVersion');
    % to
    version = '15.5'; % your macOS version

Conclution

  • Deprecation of automatic importer switch for old macOS.
  • The functionality will be changed in future releases (may has to be forced via optional input argument).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions