linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] __version__ not included in locals() of linphone m


From: Kenneth Martin
Subject: [Linphone-developers] __version__ not included in locals() of linphone module in Ubuntu but is in Raspberry Pi
Date: Tue, 18 Aug 2015 10:52:49 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0

Installed linphone python on Ubuntu 15.04 using
>sudo pip install linphone --pre
when running got:

> python
Python 2.7.9 (default, Apr  2 2015, 15:33:21)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import linphone
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/linphone/__init__.py", line 2, in <module>
    from linphone import __version__
ImportError: cannot import name __version__
>>>

Then did a small python script (test.py) that only contained 'import linphone' and ran it with
python -m pdb test.py
and single stepped into the import linphone call and doing a list found:

> python -m pdb test.py
> /home/Dropbox/Downloads/RPi/Audio/linphone/test.py(1)<module>()
-> import linphone
(Pdb) s
--Call--
> /usr/local/lib/python2.7/dist-packages/linphone/__init__.py(1)<module>()
-> from linphone import *
(Pdb) l
  1  ->    from linphone import *
  2      from linphone import __version__
[EOF]
(Pdb) n
> /usr/local/lib/python2.7/dist-packages/linphone/__init__.py(1)<module>()
-> from linphone import *
(Pdb) n
> /usr/local/lib/python2.7/dist-packages/linphone/__init__.py(2)<module>()
-> from linphone import __version__
(Pdb) from linphone import __version__
*** ImportError: cannot import name __version__
(Pdb)

The first line of __init__.py worked worked fine; I then did a locals() and can't see any method called __version__ (see below).
Doing the same in the Raspberry Pi works fine and gives

(Pdb) l
  1      from linphone import *
  2  ->    from linphone import __version__
[EOF]
(Pdb) n
--Return--
> /usr/local/lib/python2.7/dist-packages/linphone/__init__.py(2)<module>()->None
-> from linphone import __version__
(Pdb) __version__
'3.8.0'
(Pdb)

On the raspberry pi, locals() does include __version__

...
phone.Content'>, 'PresenceModel': <type 'linphone.PresenceModel'>, 'TunnelMode': <module 'TunnelMode' (built-in)>, '__version__': '3.8.0', 'RegistrationState': <module 'RegistrationState' (built-in)>, 'VideoSize': <type 'linphone.VideoSize'
...

Could this be a bug or am I doing something wrong? Any suggestions?
-Ken

reply via email to

[Prev in Thread] Current Thread [Next in Thread]