Why does mavproxy.py need to be called mavproxy1.py to work on MacOS ?

372 views
Skip to first unread message

Peter Hollands

unread,
Nov 9, 2014, 4:20:01 PM11/9/14
to mav...@googlegroups.com
mavproxy will only run if I rename mavproxy.py to mavproxy1.py and remove mavproxy.py. Does any one know why ?
Is it to do with MacOS case insensitivity of filenames ? We have MAVproxy/MAVproxy/mavproxy.py as a program path.

I want to be able to run mavproxy.py direclty from it's git directory on my machine,
so that I can develop it, and also control mavlink generation of the pymalink directories.

I  show below a complete example of running with mavproxy.py (error) and mavproxy1.py (success).

The code for MAVProxy was last updated on 1st October as shown in git log below.(Master).

Any comments would be welcome.

Best wishes, Pete

peters-imac:development phollands$ pwd
/Users/phollands/Desktop/development
peters-imac:development phollands$ ls
MAVProxy mavlink
peters-imac:development phollands$ cd MAVProxy/MAVProxy
peters-imac:MAVProxy phollands$ ls
MAVLink.xml MAVProxyWinUSB.bat mav.tlog mavproxy1.py pdh.pyc
MAVProxy.pyc __init__.py mav.tlog.raw modules tools
MAVProxyWinLAN.bat __init__.pyc mavproxy.py pdh.py
peters-imac:MAVProxy phollands$ printenv PYTHONPATH
/Users/phollands/Desktop/development/MAVProxy:/Users/phollands/Desktop/development/mavlink
peters-imac:MAVProxy phollands$ python mavproxy.py
Traceback (most recent call last):
  File "mavproxy.py", line 20, in <module>
    from MAVProxy.modules.lib import textconsole
  File "/Users/phollands/Desktop/development/MAVProxy/MAVProxy/MAVProxy.py", line 20, in <module>
    from MAVProxy.modules.lib import textconsole
ImportError: No module named modules.lib
peters-imac:MAVProxy phollands$ python
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import MAVProxy.modules.lib
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "MAVProxy.py", line 20, in <module>
    from MAVProxy.modules.lib import textconsole
ImportError: No module named modules.lib
>>> ^D
peters-imac:MAVProxy phollands$ ls
MAVLink.xml MAVProxyWinUSB.bat mav.tlog mavproxy1.py pdh.pyc
MAVProxy.pyc __init__.py mav.tlog.raw modules tools
MAVProxyWinLAN.bat __init__.pyc mavproxy.py pdh.py
peters-imac:MAVProxy phollands$ rm MAVProxy.pyc
peters-imac:MAVProxy phollands$ cp mavproxy.py mavproxy1.py
peters-imac:MAVProxy phollands$ python mavproxy1.py
Traceback (most recent call last):
  File "mavproxy1.py", line 20, in <module>
    from MAVProxy.modules.lib import textconsole
  File "/Users/phollands/Desktop/development/MAVProxy/MAVProxy/MAVProxy.py", line 20, in <module>
    from MAVProxy.modules.lib import textconsole
ImportError: No module named modules.lib
peters-imac:MAVProxy phollands$ ls
MAVLink.xml MAVProxyWinUSB.bat mav.tlog mavproxy1.py pdh.pyc
MAVProxy.pyc __init__.py mav.tlog.raw modules tools
MAVProxyWinLAN.bat __init__.pyc mavproxy.py pdh.py
peters-imac:MAVProxy phollands$ rm mavproxy.py
peters-imac:MAVProxy phollands$ ls
MAVLink.xml MAVProxyWinUSB.bat mav.tlog modules tools
MAVProxy.pyc __init__.py mav.tlog.raw pdh.py
MAVProxyWinLAN.bat __init__.pyc mavproxy1.py pdh.pyc
peters-imac:MAVProxy phollands$ rm MAVProxy.pyc
peters-imac:MAVProxy phollands$ ls
MAVLink.xml __init__.py mav.tlog.raw pdh.py
MAVProxyWinLAN.bat __init__.pyc mavproxy1.py pdh.pyc
MAVProxyWinUSB.bat mav.tlog modules tools
peters-imac:MAVProxy phollands$ python mavproxy1.py

Please choose a MAVLink master with --master
For example:
    --master=com14
    --master=/dev/ttyUSB0
    --master=127.0.0.1:14550

Auto-detected serial ports are:

peters-imac:MAVProxy phollands$ 
peters-imac:MAVProxy phollands$ git log
commit 73f0dd1b252e3f6ecd799471999670477b9e8164
Author: Andrew Tridgell <tri...@samba.org>
Date:   Wed Oct 1 14:34:18 2014 +1000

    arm: added safetyon and safetyoff


lm

unread,
Dec 12, 2014, 6:53:13 AM12/12/14
to mav...@googlegroups.com
You might want to check your installation - did you potentially install one version of MAVLink and now try to run another one locally? Or did you install two conflicting versions?

Peter Hollands

unread,
Dec 12, 2014, 11:53:05 AM12/12/14
to mav...@googlegroups.com
Lorenz,

Thanks for taking the time to read through my post and comment.

I have now re-installed from scratch, and for whatever reason, MAVproxy (installed from github) is now working on MacOS version 10.10.1  Yosemite. (I upgraded my Mac OS software as well). I have the raw MAVProxy working. 

Getting all the dependencies correct for OpenCV and matplotlib is time consuming on the Mac, so I also now run Parralells with Ubuntu 14.04, and of course, that is a much better experience with all of MAVProxy modules seeming to work. (e.g. maps).

Best wishes, Pete

P.S. For anyone following along, I am currently using the following branches ( for MatrixPilot Helical Turns Branch ) , ....

MAVPRoxy, master, 

commit a9c8f891c032dd9d36a412b7f1f4458bca009c81

Author: Andrew Tridgell <tri...@samba.org>

Date:   Thu Nov 13 12:40:39 2014 +1100

mavflightview: exclude positions very close to 0,0

MAVlink, master, 

commit 5b846cb713443a78979df7b0756228f3a9f16a52

Author: Andrew Tridgell <tri...@samba.org>

Date:   Thu Nov 6 11:06:40 2014 +1100

pymavlink: cope with missing mission items in mavmission.py






2014-12-12 11:53 GMT+00:00 lm <l...@inf.ethz.ch>:
You might want to check your installation - did you potentially install one version of MAVLink and now try to run another one locally? Or did you install two conflicting versions?

--
Sie erhalten diese Nachricht, weil Sie in Google Groups E-Mails von der Gruppe "MAVLink" abonniert haben.
Wenn Sie sich von dieser Gruppe abmelden und keine E-Mails mehr von dieser Gruppe erhalten möchten, senden Sie eine E-Mail an mavlink+u...@googlegroups.com.
Weitere Optionen finden Sie unter https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages