×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Sep 2007
    Posts
    54

    Error running in code to upload pics

    Hi, I tested this code from the python book: http://www.mobilenin.com/mobilepytho...instaflickr.py

    When I run it in my emulator, I received an error message. It states: (....line85 'form-data; name="%s"'%k
    SyntaxError: invaild syntax)
    There was an arrow in front of the word form. Any idea what I did wrong?

    Additionally, I saw the code to upload the file. Does it use ftp or binary? I have totally no idea in this area but I need it for my proj in college. Help!!

    Nicholas

  2. #2
    Super Contributor
    Join Date
    May 2006
    Location
    Oulu, Finland
    Posts
    622

    Re: Error running in code to upload pics

    Hi nick_santa83,

    There's a tipo ( \ missing)

    Before
    Code:
            BOUNDARY = "----ds9io349sfdfd!%#!dskm"
            body = []
            for k, v in params.items():
                    body.append("--" + BOUNDARY)
                    part_head = 'Content-Disposition: '
                                'form-data; name="%s"' % k
    After
    Code:
            BOUNDARY = "----ds9io349sfdfd!%#!dskm"
            body = []
            for k, v in params.items():
                    body.append("--" + BOUNDARY)
                    part_head = 'Content-Disposition: ' \ 
                                'form-data; name="%s"' % k
    That should be all.

    LFD
    Devices:
    Nokia E61 3rd Edition - pys60 1.4.0

    Tips and modules:
    http://www.lfdm.net/thesis

  3. #3
    Regular Contributor
    Join Date
    Sep 2007
    Posts
    54

    Re: Error running in code to upload pics

    ok. Thanks! Additionally, I realise that the code need to add import appuifw, e32 too. Trying out the app to see if can successfully post it online

    any idea how it uploads the pic? is it http post (binary)? or ftp?
    Last edited by nick_santa83; 2007-11-06 at 05:47.

Similar Threads

  1. Replies: 2
    Last Post: 2007-10-05, 20:40
  2. newbie : code 404 when trying to connect to localhost/test.txt
    By lynx3521 in forum Mobile Java General
    Replies: 3
    Last Post: 2007-09-25, 16:21
  3. Security code bug on 6230!
    By dabII in forum General Development Questions
    Replies: 1
    Last Post: 2005-05-17, 17:21
  4. Replies: 0
    Last Post: 2003-09-26, 15:07
  5. Testing HTTP client for Nokia 3650; Looking to share code
    By nawkboy in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2003-09-10, 15:30

Posting Permissions

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