My Flightaware antenna doesn't function

this command:
./mlat-server

try:

python3 mlat-server

Traceback (most recent call last):
File “mlat-server”, line 21, in
import mlat.server.main
ModuleNotFoundError: No module named ‘mlat.server’

I had that error when i had mlat-client installed on the system.
I mentioned you can’t have mlat-client installed and use mlat-server.

Alternatively you need to use virtualenv … there are guides online.

(env) root@raspberrypi:~/mlat-server-master# python3 mlat-server
Traceback (most recent call last):
File “mlat-server”, line 21, in
import mlat.server.main
ModuleNotFoundError: No module named ‘mlat.server’
what’s wrong?
i’m using virtualenv. Please help me

Did you activate it?

Error still seems like mlat-client is installed.

Describe the steps you used to create the virtualenv.

sudo apt install virtualenv
virtualenv env
source env/bin/activate/
then, even if I wasn’t sure it was necessary, I repeated the commands you suggested to me for the prerequisites
pip3 install numpy scipy pykalman
git clone GitHub - Shoobx/python-graph: Automatically exported from code.google.com/p/python-graph /tmp/pygraph
pip3 install /tmp/pygraph/core

That’s the issue, forgot to mention that.
You could have noticed from the console output though, see the snipped below:

root@pi ~ # virtualenv env
Running virtualenv with interpreter /usr/bin/python2
New python executable in /root/env/bin/python2
Also creating executable in /root/env/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.

So it’s making a python2 virtualenv, you need one for python3.

Do the following:

rm -r env
virtualenv env -p python3
source env/bin/activate/
which python3

Post the results :slight_smile:

Oh and for python3 > 3.4 or so, you need to change the asyncio stuff:

sed -i -e 's/asyncio\.async/asyncio.ensure_future/g' mlat/server/*.py

if I used this command it gave me this error:
-bash: env/bin/activate/: Not a directory
So I thought it was wrong and corrected it with:
source / root / env / bin / activate
So it works.
At this point I ran the command: “which python3” and then:
“sed -i -e 's /asyncio.async/asyncio.ensure_future/g’mlat/server/ *.py”
But he gave me this error:
sed: can’t read mlat / server / *. py: No such file or directory
So I went into the folder: mlat-server-master and I tried again and this time it worked.
Then I ran: “python3 mlat-server” and I get this error:
"Traceback (most recent call last):
“Mlat-server” file, line 21, in
import mlat.server.main
File “/root/mlat-server-master/mlat/server/main.py”, line 28, in
from mlat.server import jsonclient, output, coordinator, leakcheck
File “/root/mlat-server-master/mlat/server/jsonclient.py”, line 36, in
from mlat.server import net, util, connection, config
File “/root/mlat-server-master/mlat/server/config.py”, line 53, in
raise RuntimeError (‘Please update AGPL_SERVER_CODE_URL in mlat / server / config.py’)
RuntimeError: Please update AGPL_SERVER_CODE_URL in mlat / server / config.py "

That’s quite clear isn’t it?

If you can’t figure that bit out yourself, you can’t run the mlat server.

Also please learn how to format posts.

You enclose code or console output like this:

```
code
```

Which then looks like this:

code

That’s to check if you are using the python3 from the virtualenv.

Just try and understand what you’re doing.
Anyhow that part worked apparently.

Good luck with the other stuff.

1 Like
(env) root@raspberrypi:~/mlat-server-master# python3 mlat-server
Traceback (most recent call last):
  File "/root/env/lib/python3.7/site-packages/numpy/core/__init__.py", line 24, in <module>
    from . import multiarray
  File "/root/env/lib/python3.7/site-packages/numpy/core/multiarray.py", line 14, in <module>
    from . import overrides
  File "/root/env/lib/python3.7/site-packages/numpy/core/overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ImportError: libf77blas.so.3: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "mlat-server", line 21, in <module>
    import mlat.server.main
  File "/root/mlat-server-master/mlat/server/main.py", line 28, in <module>
    from mlat.server import jsonclient, output, coordinator, leakcheck
  File "/root/mlat-server-master/mlat/server/output.py", line 25, in <module>
    import numpy
  File "/root/env/lib/python3.7/site-packages/numpy/__init__.py", line 142, in <module>
    from . import core
  File "/root/env/lib/python3.7/site-packages/numpy/core/__init__.py", line 54, in <module>
    raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy c-extensions failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that, then:
  1. Check that you expected to use Python3.7 from "/root/env/bin/python3",
     and that you have no directories in your PATH or PYTHONPATH that can
     interfere with the Python and numpy version "1.18.1" you're trying to use.
  2. If (1) looks fine, you can open a new issue at
     https://github.com/numpy/numpy/issues.  Please include details on:
     - how you installed Python
     - how you installed numpy
     - your operating system
     - whether or not you have multiple versions of Python installed
     - if you built from source, your compiler versions and ideally a build log

- If you're working with a numpy git repository, try `git clean -xdf`
  (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.

Original error was: libf77blas.so.3: cannot open shared object file: No such file or directory

I read the message and i found that i haven’t the directory called /root/env/bin/python3 but i have /root/env/bin/python3.7. I tried to change that but it didn’t work.
What i can do? Thanks for your infinite patience!

Understand how virtualenv works.

You’ll have to install the required dependencies after activating the virtualenv.

With which python3 or which pip3 you can always check if you’re working on the virtualenv.

/usr/bin/python3
root@pi ~ # source env/bin/activate
root@pi ~ # which python3
/root/env/bin/python3
root@pi ~ # which pip3
/root/env/bin/pip3

You see how the path changed?
which will tell you which path will be executed when you give that command.

So after activating the virtualenv with activate, install the dependencies:

pip3 install numpy scipy pykalman
git clone https://github.com/Shoobx/python-graph.git /tmp/pygraph
pip3 install /tmp/pygraph/core

I had done it before :frowning_face:

I get the same error on Raspbian.

On my x86-64 laptop with debian unstable it works just fine.

Found a solution by googling for the error:
libf77blas.so.3: cannot open shared file: no such file or directory · Issue #14772 · numpy/numpy · GitHub

sudo apt-get install libatlas-base-dev

Thanks for your help!
now i’m configuring it and i have a question: what is motd?
How should i configure --client-listen?

Figure it out, it’s not rocket science.

Read up on the internet and understand how TCP works.
As in what is a listen port, what is a connection and how it’s established.

client-listen is where the mlat-client will connect to.

And you could have already googled motd.
Don’t ask, google first, thank you.

my mistake, we didn’t understand each other.

  1. I already know enough tcp connections and I had configured it like this: --client-listen 127.0.0.1:3005
    But then I thought that on port 3005 dump1090 sends the data in the beast format, so this was the reason why mlat-server said it received 0 messages.
    So I thought I could configure virtual radar as a rebroadcast server, in the JSON format. I also tried this and it didn’t work. My question was which IP address and port configuration I should use, not how the command worked.
  2. I had already searched for what MOTDs were, but by looking on google “motd server” I found only the meaning of “message of the day” for minecraft servers.
man motd

Anyhow it’s the message displayed to users.
You can also just search the source code.

You don’t seem to understand the architecture.

mlat-server is just the server, it needs the mlat-client program to connect to it.
(multiple mlat-client programs actually, you can’t just combine the messages, you will need to configure each mlat-client for each receiver with the appropriate location)

For that you specify a port.

–client-listen 1234

For listen, normally no IP is specified, just a port.
Well for some programs you can specify on which interface to listen by specifying an IP but i don’t know if mlat-server has that capability.

root@x230 ~/code/readsb # mlat-client 
usage: mlat-client [-h]
                   [--input-type {auto,dump1090,beast,radarcape_12mhz,radarcape_gps,radarcape,sbs,avrmlat}]
                   --input-connect INPUT_CONNECT [--results RESULTS]
                   [--no-anon-results] [--no-modeac-results] --lat LAT --lon
                   LON --alt ALT [--privacy] --user USER [--server SERVER]
                   [--no-udp]

Now you can figure out what mlat-client needs to connect to.
One connection to get the data and one connection to the server.

What’s wrong?
mlat-server console

(env) root@raspberrypi:~/mlat-server-master#  python3 mlat-server --work-dir /home/pi/test --client-listen 1234
20200220 19:28:59.178  INFO     mlattrack            Read 0 blacklist entries
20200220 19:28:59.185  INFO     client               JSON client handler listening on 0.0.0.0:1234 (TCP)
20200220 19:28:59.185  INFO     client               JSON client handler listening on :::1234 (TCP)
20200220 19:29:20.704  INFO     client               [127.0.0.1:38592] Accepted new client connection
20200220 19:29:50.727  ERROR    client               [127.0.0.1:38592] Exception handling client
Traceback (most recent call last):
  File "/root/mlat-server-master/mlat/server/jsonclient.py", line 277, in handle_connection
    hs = yield from asyncio.wait_for(self.r.readline(), timeout=30.0)
  File "/usr/lib/python3.7/asyncio/tasks.py", line 423, in wait_for
    raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
20200220 19:29:50.735  INFO     client               [127.0.0.1:38592] Disconnected
20200220 19:30:20.851  INFO     client               [127.0.0.1:38608] Accepted new client connection
20200220 19:30:29.206  ERROR    asyncio              Task exception was never retrieved
future: <Task finished coro=<JsonClient.handle_connection() done, defined at /root/mlat-server-master/mlat/server/jsonclient.py:262> exception=CancelledError()>
concurrent.futures._base.CancelledError
20200220 19:30:50.861  ERROR    client               [127.0.0.1:38608] Exception handling client
Traceback (most recent call last):
  File "/root/mlat-server-master/mlat/server/jsonclient.py", line 277, in handle_connection
    hs = yield from asyncio.wait_for(self.r.readline(), timeout=30.0)
  File "/usr/lib/python3.7/asyncio/tasks.py", line 423, in wait_for
    raise futures.TimeoutError()
concurrent.futures._base.TimeoutError

mlat-client console

root@raspberrypi:~/mlat-client-master#  mlat-client --lat ******* --lon ******* --alt *****  --user test --input-connect 127.0.0.1:30005 --input-type dump1090 --results beast,connect,127.0.0.1:1234
Thu Feb 20 19:21:44 2020 mlat-client 0.2.11 starting up
Thu Feb 20 19:21:44 2020 Beast-format results connection with 127.0.0.1:1234: [Errno 111] Connection refused
Thu Feb 20 19:22:15 2020 Beast-format results connection with 127.0.0.1:1234: [Errno 111] Connection refused
Thu Feb 20 19:22:45 2020 Beast-format results connection with 127.0.0.1:1234: [Errno 111] Connection refused
Thu Feb 20 19:23:16 2020 Beast-format results connection with 127.0.0.1:1234: [Errno 111] Connection refused
Thu Feb 20 19:23:46 2020 Beast-format results connection with 127.0.0.1:1234: [Errno 111] Connection refused
Thu Feb 20 19:23:55 2020 Connection to mlat.mutability.co.uk:40147 lost: [Errno 110] Connection timed out
Thu Feb 20 19:23:55 2020 Reconnecting in 30.0 seconds

you need to specify your own server.
how would it know where to connect to otherwise?

Oh you connected the results from the client to the server … that’s just … try to understand what the options do.