×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    6

    KerrInUse or Permission Denied

    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
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,796

    Re: KerrInUse or Permission Denied

    Depends on the file status- is it open or in use?
    Pankaj Nathani
    www.croozeus.com

  3. #3
    Registered User
    Join Date
    Dec 2008
    Posts
    6

    Re: KerrInUse or Permission Denied

    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
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: KerrInUse or Permission Denied

    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
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,796

    Smile Re: KerrInUse or Permission Denied

    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. Replies: 20
    Last Post: 2009-05-30, 16:28
  3. Permission denied
    By manugarrote in forum Symbian
    Replies: 4
    Last Post: 2007-05-29, 23:25
  4. Permission Denied
    By saiful_nokia in forum Symbian
    Replies: 1
    Last Post: 2007-01-17, 08:21
  5. Permission Denied When Call
    By saiful_nokia in forum Symbian
    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
  •  
×