Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User gueninmi's Avatar
    Join Date
    Dec 2008
    Posts
    6
    I have loaded pictures from a folder in a list with code like this in a loop :

    file = u"E:\\pict" + str(i) + ".jpg"
    tab[i] = graphics.Image.open(file)

    Then i need to delete a picture file on the memory card and i use for example :

    while i < MAX:
    file1 = u"E:\\pict" + str(i+1) + ".jpg"
    file2 = u"E:\\pict" + str(i) + ".jpg"
    e32.file_copy(file2,file1)
    x = x + 1

    file = u"E:\\pict" + str(MAX) + ".jpg"
    os.remove(file)


    The problem is that there is sometimes an exception on e32.filc_copy "[Error 14] KerrInUse" or on remove "[Error 13] Permission denied" and sometimes the file is copied or deleted ans sometimes no.

    I Tried to initialize tab with a loop and tab[i] = None in order to unlock "read locks" on the files but it doesn't work better.

    Does anyone know solution about these lock problems ?

    Thanks

  2. #2
    Nokia Developer Moderator croozeus's Avatar
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,650
    Depends on the file status- is it open or in use?
    Pankaj Nathani
    www.croozeus.com

  3. #3
    Registered User gueninmi's Avatar
    Join Date
    Dec 2008
    Posts
    6
    I don't know how to display File status in PyS60 but this is not a problem because i found in the code the open file that was locking before the step e32.file_copy and remove.

    So This thread can be deleted (no interest)

  4. #4
    Nokia Developer Champion gaba88's Avatar
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,701
    Quote Originally Posted by gueninmi View Post
    So This thread can be deleted (no interest)
    hello guemini

    no need to delete this thread it can always help others if they have same sort of problem.

  5. #5
    Nokia Developer Moderator croozeus's Avatar
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,650
    Quote Originally Posted by gueninmi View Post
    I don't know how to display File status in PyS60 but this is not a problem because i found in the code the open file that was locking before the step e32.file_copy and remove.
    I would do it with exception handling without researching much - trying to open a file.
    Pankaj Nathani
    www.croozeus.com

Similar Threads

  1. Replies: 8
    Last Post: 2011-06-29, 06:34
  2. CTelephony gives status permission denied for dial new call
    By chandran.biju007 in forum Symbian C++
    Replies: 20
    Last Post: 2009-05-30, 16:28
  3. Permission denied
    By manugarrote in forum Python
    Replies: 4
    Last Post: 2007-05-29, 23:25
  4. Permission Denied
    By saiful_nokia in forum Symbian C++
    Replies: 1
    Last Post: 2007-01-17, 08:21
  5. Permission Denied When Call
    By saiful_nokia in forum Symbian C++
    Replies: 1
    Last Post: 2007-01-17, 08: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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved