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

Opening anTrax issue #32

Open
MarkJThomas opened this issue Nov 1, 2021 · 14 comments
Open

Opening anTrax issue #32

MarkJThomas opened this issue Nov 1, 2021 · 14 comments

Comments

@MarkJThomas
Copy link

Hi,
thank you for the app!
I tried opening the app but kept getting the below error: (I am on Mac OS)

First, I downloaded tensorflow version 1.15 in the conda env tf15 and successfully installed anTrax:

(base) markthomas@Marks-Air anTrax % conda activate tf15

Next, I tried running the code as per the instructions:

(tf15) markthomas@Marks-Air anTrax % antrax configure /Users/markthomas/Desktop/Home/MRes/Other_chapters/Ants/anTraX/anTraX-data/JS16

But got this error:

Traceback (most recent call last):
File "/Users/markthomas/miniconda3/envs/tf15/bin/antrax", line 5, in
from antrax.cli import main
File "/Users/markthomas/miniconda3/envs/tf15/lib/python3.7/site-packages/antrax/cli.py", line 5, in
from .matlab import *
File "/Users/markthomas/miniconda3/envs/tf15/lib/python3.7/site-packages/antrax/matlab.py", line 22, in
ANTRAX_BIN_PATH = ANTRAX_PATH + '/bin/'
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Any help is greatly appreciated!

@MarkJThomas
Copy link
Author

I think it's related to MATLAB reading the code, and I thought I had it installed but maybe that is the reason?
tyi

@asafgal
Copy link
Contributor

asafgal commented Nov 1, 2021 via email

@MarkJThomas
Copy link
Author

I didn't, I am not technically sound - do you have/or point me in the direction of how I can do that please?

@asafgal
Copy link
Contributor

asafgal commented Nov 1, 2021

See in the installation instructions:

export ANTRAX_PATH=<full path to anTraX repository>
export ANTRAX_USE_MCR=False

You can verify the variables by typing in terminal while inside the conda environment:

echo $ANTRAX_PATH

@MarkJThomas
Copy link
Author

ty, can I just confirm I need to install MATLAB?

@asafgal
Copy link
Contributor

asafgal commented Nov 1, 2021 via email

@MarkJThomas
Copy link
Author

I don't have any of them installed or a MATLAB license - do you download it here (MCR): https://uk.mathworks.com/products/compiler/matlab-runtime.html

Please forgive all the questions! This is quite new to me :)

@asafgal
Copy link
Contributor

asafgal commented Nov 1, 2021

Yes, choose version R2019a.

Don't worry about it! hope it will work out for you

@MarkJThomas
Copy link
Author

MarkJThomas commented Nov 2, 2021

Thank you for your support! I managed to get MATLAB installed and connect the paths, and it says Welcome to AnTrax, however, I get this error now:

dyld: Library not loaded: @rpath/libmwlaunchermain.dylib
Referenced from: /Users/markthomas/Desktop/Home/MRes/Other_chapters/Ants/anTraX/bin/antrax_maci64_mcr_interface.app/Contents/MacOS/antrax_maci64_mcr_interface
Reason: image not found

Do you know what that is referring too?

tyi

@asafgal
Copy link
Contributor

asafgal commented Nov 4, 2021

Hey Mark, sorry for the delayed reply.

You also need to define the path to MCR (I'm guessing that what you use):

export ANTRAX_MCR=<full path to MCR installation>

Try to follow the installation steps in the docs!

@MarkJThomas
Copy link
Author

Thank you! I did but I didn't know which folder to define the path too, there's a lot of different ones. When I added the path to the main folder nothing opened, then when I defined it to the current folder it opens but I get the above error message. These are the paths currently loaded in my .zprofile:

Screenshot 2021-11-04 at 15 22 24

@asafgal
Copy link
Contributor

asafgal commented Nov 4, 2021 via email

@MarkJThomas
Copy link
Author

updated but just got the same error message:

dyld: Library not loaded: @rpath/libmwlaunchermain.dylib
Referenced from: /Users/markthomas/Desktop/Home/MRes/Other_chapters/Ants/anTraX/bin/antrax_maci64_mcr_interface.app/Contents/MacOS/antrax_maci64_mcr_interface
Reason: image not found
(tf15) markthomas@Marks-Air ~ %

Maybe it's just not meant to be :D

Screenshot 2021-11-04 at 17 40 04

@janamach
Copy link
Contributor

janamach commented Mar 2, 2022

I just installed anTraX on a new work computer running Ubuntu 20.04. I had anTraX working on multiple other machines, so I just copied all my config files as I usually do (which usually works). But not this time. For whatever reason I got this error message:

$ antrax configure 

==================================================================================

Welcome to anTraX - a software for tracking color tagged ants (and other insects)

==================================================================================

02/03/22 21:12:54 -D- antrax cli entry point
02/03/22 21:12:54 -D- running matlab mcr 
02/03/22 21:12:54 -D- command is: /home/jana/src/anTraX/bin/antrax_glnxa64_mcr_interface antrax
/home/jana/src/anTraX/bin/antrax_glnxa64_mcr_interface: error while loading shared libraries: libmwlaunchermain.so: cannot open shared object file: No such file or directory
02/03/22 21:12:54 -D- matlab app exited with code 127

A quick search for libmwlaunchermain lead me to your post, @MarkJThomas. On my system, something weird has happened and the library was not loading even though the correct LD_LIBRARY_PATH was set.

A similar issue is discussed here:
https://mathworks.com/matlabcentral/answers/267562-how-can-i-resolve-this-mcc-runtime-error-cannot-open-shared-object-library#answer_211306
And I found my "solution" here:
https://mathworks.com/help/compiler/mcr-path-settings-for-run-time-deployment.html

The "solution" I found is bizarre, but it works for some reason:

LD_LIBRARY_PATH=/usr/local/MATLAB/MATLAB_Runtime/v96/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v96/bin/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v96/sys/os/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v96/extern/bin/glnxa64

mypath=$LD_LIBRARY_PATH
mypath="${mypath:+${mypath}:}"
export LD_LIBRARY_PATH=$mypath

And then antrax loads normally:

$ antrax configure

==================================================================================

Welcome to anTraX - a software for tracking color tagged ants (and other insects)

==================================================================================

02/03/22 21:47:08 -D- antrax cli entry point
02/03/22 21:47:08 -D- running matlab mcr 
02/03/22 21:47:08 -D- command is: /home/jana/src/anTraX/bin/antrax_glnxa64_mcr_interface antrax
21:47:14 -D- starting antrax configure app
app closing..
02/03/22 21:47:20 -D- matlab app exited with code 0

While doing simply this LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}" doesn't help. And the above "solution" makes little sense, because LD_LIBRARY_PATH barely changes after the procedure:

$ echo ${LD_LIBRARY_PATH}
/usr/local/MATLAB/MATLAB_Runtime/v96/runtime/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v96/bin/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v96/sys/os/glnxa64:/usr/local/MATLAB/MATLAB_Runtime/v96/extern/bin/glnxa64::

I really don't understand this, it's very weird... Anyhow, I am writing this here in case somebody else runs into this problem.

@MarkJThomas looking at your post, I think you should try following the steps in the link I posted above for macOS. If it's a library not found thing, it should be fixable.

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

No branches or pull requests

3 participants