×

Discussion Board

Page 1 of 3 123 LastLast
Results 1 to 15 of 31
  1. #1
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    285

    Error using 'location' library while determining cell id

    Hi!

    I am trying to follow the example code available here -
    How to get info on cell location.

    Seeing the python code, I tried the following commands in the Python -> Options -> Interactive Console -
    Code:
    >>> import location
    >>> mcc, mnc, lac, cellid = location.gsm_location()
    Traceback (most recent call last): File "<console>" line 1, in ?
    TypeError: unpack non-sequence
    If I try the following, I don't get any output either (quite expected) :
    Code:
    >>> import location
    >>> print location.gsm_location()
    NONE
    Does the location function call differ from country to country? I am definitely connected to the GSM network - I can make/receive calls! Or, am I missing some files/libraries that is causing the error?

    Thanks

    PS : I am trying the example out in India, and my service provider is AirTel.

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Error using 'location' library while determining cell id

    Hi,

    Is your script shell signed with Location, ReadDeviceData and ReadUserData capabilities, like it says in the article? If it isn't sign it and try again and let us know if it works.

  3. #3
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Re: Error using 'location' library while determining cell id

    I am not sure how scripts work here but you would require only ReadDeviceData capability to get Cell ID.
    Nokia Developer Wiki Moderation team

  4. #4
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    285

    Re: Error using 'location' library while determining cell id

    Hi!

    Is your script shell signed with Location, ReadDeviceData and ReadUserData capabilities, like it says in the article? If it isn't sign it and try again and let us know if it works.
    I am using Python version 1.4.2 from the Sourceforge page (Script Shell and Python for S60).
    Will using newer versions solve the issue? Will try that right away..

    Is there any other way to sign the script shell myself with Location, ReadDeviceData and ReadUserData as advised in the tutorial?

    Thanks.

  5. #5
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Re: Error using 'location' library while determining cell id

    See this: OpenSigned Online
    Nokia Developer Wiki Moderation team

  6. #6
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    285

    Re: Error using 'location' library while determining cell id

    Quote Originally Posted by kiran10182 View Post
    I checked the link. It says the following (regarding the capabilities) -
    SIS files can be signed for all Platform Security Capabilities except CommDD, MultimediaDD, NetworkControl, DiskAdmin, DRM, AllFiles, TCB.
    However, I still do not know how to go about 'signing the sis file for a capability'.

    I also checked the Python script shell (I installed ver. 1.9.2). When installing, it did say it had ReadUserData capabilities.

    Sorry if the doubts appear too basic.

    Thanks

    Update : I tried with a more recent version of Python Shell Script (version 1.9.2). While installing, it told me it had the ReadUserData application access. It does not mention Location or ReadDeviceData capbilties. Is this the problem?
    It does say it has the following application access - 'Use network or make phone calls' and 'Use connectivity applications'. Is there some way I can add the following capabilities?

    Aside : In the latest version (like there were in previous versions) there is no file with a name like Python_1.9.7_3rdEd.sis. Will Python_1.9.6_fixed.sis work for 3rd Ed phones (that are not FP1/2)?
    Last edited by kedarm; 2009-11-02 at 14:12. Reason: More information

  7. #7
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,347

    Re: Error using 'location' library while determining cell id

    I am not a python person but as I read from the posts, you need to sign your shell from OpenSigned Online. You can do it in the same link: https://www.symbiansigned.com/app/pa...ignedOnline.do
    Nokia Developer Wiki Moderation team

  8. #8
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Error using 'location' library while determining cell id

    http://pys60.garage.maemo.org/doc/s6...-location.html
    Note: Location module requires capabilities ReadDeviceData, ReadUserData and Location in 3rd Edition devices.
    I guess you should tell us what phone you're using.

    So:
    1. Use PyS60 1.4.5 (the latest stable release) from Sourceforge, sign the script shell and see if it works.
    2. Use PyS60 1.9.7 (the latest unstable release) from Maemo Garage, sign the script shell and see if it works.

  9. #9
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    285

    Re: Error using 'location' library while determining cell id

    I guess you should tell us what phone you're using.
    I use the Nokia N73.

    1. Use PyS60 1.4.5 (the latest stable release) from Sourceforge, sign the script shell and see if it works.
    2. Use PyS60 1.9.7 (the latest unstable release) from Maemo Garage, sign the script shell and see if it works.
    Aren't the above already signed by the author(s)? Do I need to resign them? When I tried signing them, I got the following error -
    The .sis file contains capabilities that are not permitted for Open Signed (Online)
    FAILURE: Submitted .sis file uses a UID that is not allocated to the account holder matching this email address (0x2000b1a6 )
    Should I unsign the package (using siscontents or esymble) and change UID before signing it using opensigned? Are there any licensing issues with doing something like this - changing UID and resigning packages?

    I tried PyS60 1.4.5 but I got the same errors as I did with PyS60 1.4.2. Namely -
    >>> import location
    >>> mcc, mnc, lac, cellid = location.gsm_location()
    Traceback (most recent call last): File "<console>" line 1, in ?
    TypeError: unpack non-sequence
    and
    >>> import location
    >>> print location.gsm_location()
    NONE
    Thanks
    Last edited by kedarm; 2009-11-03 at 04:42. Reason: more information

  10. #10
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,800

    Re: Error using 'location' library while determining cell id

    How about referring to this?

    Quote Originally Posted by tvijayan View Post
    The PythonScriptShell packages are available in different flavors varying in the capability set.
    The capability set for PythonScriptShell_1.9.7_3_0.sis is ReadUserData WriteUserData NetworkServices LocalServices UserEnvironment.
    The capability set for PythonScriptShell_1.9.7_3_2 is ReadUserData WriteUserData NetworkServices LocalServices UserEnvironment Location.
    The capability set for PythonScriptShell_1.9.7_high_capas.sis is LocalServices NetworkServices ReadUserData WriteUserData UserEnvironment Location SwEvent WriteDeviceData ReadDeviceData
    The capability set for PythonScriptShell_1.9.7_unsigned_devcert.sis is LocalServices NetworkServices ReadUserData WriteUserData UserEnvironment Location PowerMgmt ProtServ SwEvent SurroundingsDD ReadDeviceData WriteDeviceData TrustedUI
    So sign PythonScriptShell_1.9.7_3_0.sis with all caps and install it.

    https://www.symbiansigned.com/app/pa...ignedOnline.do

    There is no need to change the UID of the application before signing, the UID is already a test range UID.
    Pankaj Nathani
    www.croozeus.com

  11. #11
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    285

    Re: Error using 'location' library while determining cell id

    Hi!

    Thanks for the help. I guess using PythonScriptShell_1.9.7_unsigned_devcert.sis is the best option for me! Will try it and get right back..

    One question though, which is the Python for S60 Runtime that I need to install? Does the runtime environment come embedded with the Script Shell? There is no file with a name similar to Python_1.9.7_3rdEd.sis.
    I use the Nokia N73 - can I use the FP1/2 versions of the Python Runtime? I use the 3rd Ed. Maintenance Release SDK for all development work, so was not sure if the FP1/2 versions will be compatible.

    Updated :
    I tried installing the Python_1.9.6_fixed.sis runtime along with the PythonScriptShell_1.9.7_unsigned_devcert.sis mentioned. However, the installation failed giving the error - "Unable to install. Python runtime ver 1.09.. or higher is required."
    Doesn't version 1.9.6 come under the ver 1.09 or higher category?

    Where would I find the others (ie 1.9.7_0, 1.9.7_3, etc)? I could not find anything on the Maemo site.
    Last edited by kedarm; 2009-11-03 at 07:11.

  12. #12
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,800

    Re: Error using 'location' library while determining cell id

    Quote Originally Posted by kedarm View Post
    One question though, which is the Python for S60 Runtime that I need to install? Does the runtime environment come embedded with the Script Shell? There is no file with a name similar to Python_1.9.7_3rdEd.sis.
    Install this one - Python_1.9.7.sis!
    Pankaj Nathani
    www.croozeus.com

  13. #13
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    285

    Re: Error using 'location' library while determining cell id

    Quote Originally Posted by croozeus View Post
    Install this one - Python_1.9.7.sis!
    Aha! I finally found it here.

    Why has it not been uploaded on the maemo site? Or has it been put elsewhere on the site?

  14. #14
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Error using 'location' library while determining cell id

    It's available in the PyS60 Dependencies folder, which you can find in PythonForS60_1.9.7.tar.gz

  15. #15
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    285

    Re: Error using 'location' library while determining cell id

    I apologize for deviating off the topic, into installation of python runtime, instead of sticking with the location module, but I'm hoping the correct script shell will solve the problem.

    I downloaded the PythonForS60_1.9.7.tar.gz and installed the file Python_1.9.7.sis in the PyS60 Dependencies folder. However, as soon as I try to open the application (to reach the interactive console), I get the following error -
    Check if the following components are installed.
    -> Python Runtime
    -> PIPS Library
    Since I had just installed Python Runtime, I tried to install pips. But, the phone tells me that it has already been installed. I even tried reinstalling the Python Runtime and the PIPS Library, but the same problem still continues.
    (In fact, the PIPS Library seems to be embedded in the Python Runtime sis file)

    Thanks

Similar Threads

  1. Error loading connection when obfuscation high?
    By ejakkk in forum Mobile Java General
    Replies: 8
    Last Post: 2009-06-26, 12:54
  2. Can't get around "Program is not a recognized executable" when trying to debug my app
    By leisti in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 5
    Last Post: 2008-06-27, 16:32
  3. "Run Last Launched" did not complete normally !!
    By mockba in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 7
    Last Post: 2008-06-15, 13:15
  4. Import problems carbide.c++
    By vigja in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2006-09-06, 15:37
  5. cell id - location
    By gheese in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2003-07-24, 10:18

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×