Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uiextras error in Matlab 2020b #235

Closed
rhayman opened this issue Sep 22, 2020 · 8 comments · Fixed by #595
Closed

uiextras error in Matlab 2020b #235

rhayman opened this issue Sep 22, 2020 · 8 comments · Fixed by #595

Comments

@rhayman
Copy link

rhayman commented Sep 22, 2020

Did a clean Matlab 2020b install within Ubuntu 20.04. mexGPUall runs and completes with no problems but on running

kilosort

from with the Kilosort2 folder I get the following error:

In ksGUI/init (line 69)
In ksGUI (line 45)
In kilosort (line 17)
Error using uiextras.Panel
Cannot define property 'Enable' in class 'Panel' because the property has already been defined in the
superclass 'Panel'.
Error in ksGUI/build (line 111)
obj.H.logPanel = uiextras.Panel(...
Error in ksGUI (line 47)
obj.build(parent);
Error in kilosort (line 17)
h = ksGUI(f);

Thanks in advance for any help

@MDrueke
Copy link

MDrueke commented Oct 5, 2020

I get the same error, Matlab 2020b on Win 10.
Thanks for helping!

edit: Runs on Matlab 2018b without any issues.

@mdavatol
Copy link

mdavatol commented Oct 6, 2020

I get the same error too, Matlab 2020b on Windows 10.

> Error using uiextras.Panel
Cannot define property 'Enable' in class 'Panel' because the property has already been defined in the superclass 'Panel'.

Error in ksGUI/build (line 111)
            obj.H.logPanel = uiextras.Panel(...

Error in ksGUI (line 47)
            obj.build(parent);

Error in kilosort (line 17)
h = ksGUI(f);

@chris-angeloni
Copy link

This error looks a bit different than what I've encountered, so maybe it's specific to 2020 matlab (thanks 2020), but I found that it was easy to install the wrong uiextras toolbox, see this old comment: #46 (comment)

@rhayman
Copy link
Author

rhayman commented Oct 9, 2020

This is almost definitely a Matlab 2020 issue; I've just installed 2019b alongside 2020b and KiloSort works just fine

@lachioma
Copy link

I get exactly the same error as rhayman with Matlab 2020b, Windows 10, and "GUI Layout Toolbox" by David Sampson (version 2.3.4).

@nsteinme
Copy link
Collaborator

Based on the comments by the toolbox author here (https://www.mathworks.com/matlabcentral/fileexchange/47982-gui-layout-toolbox) it appears that they are aware that there are issues with 2020. Hopefully they will fix it...

If anyone wants to try to dig in here and see whether there might be an easy fix to this particular error, please do!

@aliddell
Copy link
Contributor

There's a relatively easy fix here if you don't mind hacking on the toolbox source. You just have to remove the Enable property and its getter and setter from the Panel class. For me, this file is in MATLAB/Add-Ons/Toolboxes/GUI Layout Toolbox/layout/+uiextras.

Here's a patch to visualize this, but really you just delete a few lines. If the author publishes an update, you might have to do this again (or maybe it'll be fixed in the update, who knows).

--- C:\Users\alanc\OneDrive\Documents\MATLAB\Add-Ons\Toolboxes\GUI Layout Toolbox\layout\+uiextras\Panel.m.bak
+++ C:\Users\alanc\OneDrive\Documents\MATLAB\Add-Ons\Toolboxes\GUI Layout Toolbox\layout\+uiextras\Panel.m
@@ -32,7 +32,6 @@
     %  $Revision: 979 $ $Date: 2014-09-28 14:26:12 -0400 (Sun, 28 Sep 2014) $
     
     properties( Hidden, Access = public, Dependent )
-        Enable % deprecated
         SelectedChild
     end
     
@@ -53,30 +52,6 @@
     end % structors
     
     methods
-        
-        function value = get.Enable( ~ )
-            
-            % Warn
-            % warning( 'uiextras:Deprecated', ...
-            %     'Property ''Enable'' will be removed in a future release.' )
-            
-            % Return
-            value = 'on';
-            
-        end % get.Enable
-        
-        function set.Enable( ~, value )
-            
-            % Check
-            assert( ischar( value ) && any( strcmp( value, {'on','off'} ) ), ...
-                'uiextras:InvalidPropertyValue', ...
-                'Property ''Enable'' must be ''on'' or ''off''.' )
-            
-            % Warn
-            % warning( 'uiextras:Deprecated', ...
-            %     'Property ''Enable'' will be removed in a future release.' )
-            
-        end % set.Enable
         
         function value = get.SelectedChild( obj )

@mdavatol
Copy link

mdavatol commented Nov 1, 2020

Thanks everyone! Commenting the lines that aliddell posted in his comment worked and the GUI works for me now when using Matlab 2020b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants