sync databse table based on current directory data without losign previous values

Νίκος Γκρ33κ nikos.gr33k at gmail.com
Wed Mar 6 04:41:31 EST 2013


Its about the following line of code:

current_fullpaths.add( os.path.join(root, files) )


that presents the following error:

<type 'exceptions.AttributeError'>: 'list' object has no attribute 'startswith' 
      args = ("'list' object has no attribute 'startswith'",) 
      message = "'list' object has no attribute 'startswith'"

join calls some module that find difficulty when parsing its line:

 /usr/lib64/python2.6/posixpath.py in join(a='/home/nikos/public_html/data/files/', *p=(['\xce\x9a\xcf\x8d\xcf\x81\xce\xb9\xce\xb5 \xce\x99\xce\xb7\xcf\x83\xce\xbf\xcf\x8d \xce\xa7\xcf\x81\xce\xb9\xcf\x83\xcf\x84\xce\xad \xce\x95\xce\xbb\xce\xad\xce\xb7\xcf\x83\xce\xbf\xce\xbd \xce\x9c\xce\xb5.mp3', '\xce\xa0\xce\xb5\xcf\x81\xce\xaf \xcf\x84\xcf\x89\xce\xbd \xce\x9b\xce\xbf\xce\xb3\xce\xb9\xcf\x83\xce\xbc\xcf\x8e\xce\xbd.mp3'],))
   63     path = a
   64     for b in p:
   65         if b.startswith('/'):



More information about the Python-list mailing list