[PhotoFloat] TypeError: can't compare datetime.datetime to unicode

Julien Eula julieneula at yahoo.fr
Sun Jan 12 15:41:46 CET 2014


For what it's worth I get the same error message, even though my image
filenames contain no unicode characters

$ ./main.py ../web/albums/ ../web/cache/
2014-01-12T15:34:07.448019   [walking]       albums
2014-01-12T15:34:07.448539   |--[walking]       Images
2014-01-12T15:34:07.448931   |  |--[walking]       atrierpourquoifaire
2014-01-12T15:34:07.449405   |  |  |--[metainfo]      aX2uHiT.png
2014-01-12T15:34:07.516343   |  |  |--[thumbing]      aX2uHiT.png ->
75px, square
2014-01-12T15:34:07.516675   |  |  |--[thumbing]      aX2uHiT.png ->
150px, square
2014-01-12T15:34:07.516979   |  |  |--[thumbing]      aX2uHiT.png -> 640px
2014-01-12T15:34:07.517227   |  |  |--[thumbing]      aX2uHiT.png -> 800px
2014-01-12T15:34:07.517469   |  |  |--[thumbing]      aX2uHiT.png -> 1024px
2014-01-12T15:34:07.517719   |  |  |--[metainfo]      5ngXegP.jpg
2014-01-12T15:34:07.522162   |  |  |--[thumbing]      5ngXegP.jpg ->
75px, square
2014-01-12T15:34:07.522479   |  |  |--[thumbing]      5ngXegP.jpg ->
150px, square
2014-01-12T15:34:07.522727   |  |  |--[thumbing]      5ngXegP.jpg -> 640px
2014-01-12T15:34:07.522972   |  |  |--[thumbing]      5ngXegP.jpg -> 800px
2014-01-12T15:34:07.523213   |  |  |--[thumbing]      5ngXegP.jpg -> 1024px
2014-01-12T15:34:07.523499   |  |  |--[metainfo]      1U6GUqu.jpg
2014-01-12T15:34:07.524067   |  |  |--[thumbing]      1U6GUqu.jpg ->
75px, square
2014-01-12T15:34:07.524324   |  |  |--[thumbing]      1U6GUqu.jpg ->
150px, square
2014-01-12T15:34:07.524568   |  |  |--[thumbing]      1U6GUqu.jpg -> 640px
2014-01-12T15:34:07.524809   |  |  |--[thumbing]      1U6GUqu.jpg -> 800px
2014-01-12T15:34:07.525093   |  |  |--[thumbing]      1U6GUqu.jpg -> 1024px
2014-01-12T15:34:07.525324   |  |  |--[metainfo]      MDaGUhh.jpg
2014-01-12T15:34:07.525889   |  |  |--[thumbing]      MDaGUhh.jpg ->
75px, square
2014-01-12T15:34:07.526147   |  |  |--[thumbing]      MDaGUhh.jpg ->
150px, square
2014-01-12T15:34:07.526390   |  |  |--[thumbing]      MDaGUhh.jpg -> 640px
2014-01-12T15:34:07.526632   |  |  |--[thumbing]      MDaGUhh.jpg -> 800px
2014-01-12T15:34:07.526873   |  |  |--[thumbing]      MDaGUhh.jpg -> 1024px
2014-01-12T15:34:07.527100   |  |  |--[metainfo]      M2dE9.jpg
2014-01-12T15:34:07.527617   |  |  |--[thumbing]      M2dE9.jpg -> 75px, square
2014-01-12T15:34:07.527869   |  |  |--[thumbing]      M2dE9.jpg -> 150px, square
2014-01-12T15:34:07.528103   |  |  |--[thumbing]      M2dE9.jpg -> 640px
2014-01-12T15:34:07.528339   |  |  |--[thumbing]      M2dE9.jpg -> 800px
2014-01-12T15:34:07.528573   |  |  |--[thumbing]      M2dE9.jpg -> 1024px
2014-01-12T15:34:07.528799   |  |  |--[metainfo]      ablv0Ld.jpg
2014-01-12T15:34:07.529366   |  |  |--[thumbing]      ablv0Ld.jpg ->
75px, square
2014-01-12T15:34:07.529523   |  |  |--[thumbing]      ablv0Ld.jpg ->
150px, square
2014-01-12T15:34:07.529665   |  |  |--[thumbing]      ablv0Ld.jpg -> 640px
2014-01-12T15:34:07.529806   |  |  |--[thumbing]      ablv0Ld.jpg -> 800px
2014-01-12T15:34:07.529946   |  |  |--[thumbing]      ablv0Ld.jpg -> 1024px
2014-01-12T15:34:07.530085   |  |  |--[metainfo]      ZPZ8FK6.png
2014-01-12T15:34:07.530592   |  |  |--[thumbing]      ZPZ8FK6.png ->
75px, square
2014-01-12T15:34:07.530753   |  |  |--[thumbing]      ZPZ8FK6.png ->
150px, square
2014-01-12T15:34:07.530896   |  |  |--[thumbing]      ZPZ8FK6.png -> 640px
2014-01-12T15:34:07.531038   |  |  |--[thumbing]      ZPZ8FK6.png -> 800px
2014-01-12T15:34:07.531180   |  |  |--[thumbing]      ZPZ8FK6.png -> 1024px
2014-01-12T15:34:07.531335   |  |  |--[metainfo]      OrJunPB.png
2014-01-12T15:34:07.531652   |  |  |--[thumbing]      OrJunPB.png ->
75px, square
2014-01-12T15:34:07.531805   |  |  |--[thumbing]      OrJunPB.png ->
150px, square
2014-01-12T15:34:07.531947   |  |  |--[thumbing]      OrJunPB.png -> 640px
2014-01-12T15:34:07.532090   |  |  |--[thumbing]      OrJunPB.png -> 800px
2014-01-12T15:34:07.532230   |  |  |--[thumbing]      OrJunPB.png -> 1024px
2014-01-12T15:34:07.532369   |  |  |--[metainfo]      eQjXAxD.jpg
2014-01-12T15:34:07.532714   |  |  |--[thumbing]      eQjXAxD.jpg ->
75px, square
2014-01-12T15:34:07.532873   |  |  |--[thumbing]      eQjXAxD.jpg ->
150px, square
2014-01-12T15:34:07.533047   |  |  |--[thumbing]      eQjXAxD.jpg -> 640px
2014-01-12T15:34:07.533190   |  |  |--[thumbing]      eQjXAxD.jpg -> 800px
2014-01-12T15:34:07.533333   |  |  |--[thumbing]      eQjXAxD.jpg -> 1024px
2014-01-12T15:34:07.533481   |  |  |--[metainfo]
big_five_part_1_by_crazyasian1-d633ujg.jpg
2014-01-12T15:34:07.533824   |  |  |--[thumbing]
big_five_part_1_by_crazyasian1-d633ujg.jpg -> 75px, square
2014-01-12T15:34:07.533983   |  |  |--[thumbing]
big_five_part_1_by_crazyasian1-d633ujg.jpg -> 150px, square
2014-01-12T15:34:07.534130   |  |  |--[thumbing]
big_five_part_1_by_crazyasian1-d633ujg.jpg -> 640px
2014-01-12T15:34:07.534277   |  |  |--[thumbing]
big_five_part_1_by_crazyasian1-d633ujg.jpg -> 800px
2014-01-12T15:34:07.534423   |  |  |--[thumbing]
big_five_part_1_by_crazyasian1-d633ujg.jpg -> 1024px
2014-01-12T15:34:07.534561   |  |  |--[metainfo]      Sb1dITJ.jpg
2014-01-12T15:34:07.534923   |  |  |--[thumbing]      Sb1dITJ.jpg ->
75px, square
2014-01-12T15:34:07.535081   |  |  |--[thumbing]      Sb1dITJ.jpg ->
150px, square
2014-01-12T15:34:07.535227   |  |  |--[thumbing]      Sb1dITJ.jpg -> 640px
2014-01-12T15:34:07.535372   |  |  |--[thumbing]      Sb1dITJ.jpg -> 800px
2014-01-12T15:34:07.535515   |  |  |--[thumbing]      Sb1dITJ.jpg -> 1024px
2014-01-12T15:34:07.535651   |  |  |--[metainfo]      8ok20Fj.jpg
2014-01-12T15:34:07.535986   |  |  |--[thumbing]      8ok20Fj.jpg ->
75px, square
2014-01-12T15:34:07.536142   |  |  |--[thumbing]      8ok20Fj.jpg ->
150px, square
2014-01-12T15:34:07.536288   |  |  |--[thumbing]      8ok20Fj.jpg -> 640px
2014-01-12T15:34:07.536433   |  |  |--[thumbing]      8ok20Fj.jpg -> 800px
2014-01-12T15:34:07.536577   |  |  |--[thumbing]      8ok20Fj.jpg -> 1024px
2014-01-12T15:34:07.536713   |  |  |--[metainfo]      VSzBxqu.jpg
2014-01-12T15:34:07.537050   |  |  |--[thumbing]      VSzBxqu.jpg ->
75px, square
2014-01-12T15:34:07.537205   |  |  |--[thumbing]      VSzBxqu.jpg ->
150px, square
2014-01-12T15:34:07.537348   |  |  |--[thumbing]      VSzBxqu.jpg -> 640px
2014-01-12T15:34:07.537488   |  |  |--[thumbing]      VSzBxqu.jpg -> 800px
2014-01-12T15:34:07.537629   |  |  |--[thumbing]      VSzBxqu.jpg -> 1024px
2014-01-12T15:34:07.537755   |  |  |--[walking]       8bit Day - Imgur
2014-01-12T15:34:07.596695   |  |  |--[full cache]    8bit Day - Imgur
2014-01-12T15:34:07.597367   |  |  |--[caching]       8bit Day - Imgur
2014-01-12T15:34:07.600206   |  |  |--[metainfo]      PcBhWVP.jpg
2014-01-12T15:34:07.600818   |  |  |--[thumbing]      PcBhWVP.jpg ->
75px, square
2014-01-12T15:34:07.601133   |  |  |--[thumbing]      PcBhWVP.jpg ->
150px, square
2014-01-12T15:34:07.601366   |  |  |--[thumbing]      PcBhWVP.jpg -> 640px
2014-01-12T15:34:07.601511   |  |  |--[thumbing]      PcBhWVP.jpg -> 800px
2014-01-12T15:34:07.601655   |  |  |--[thumbing]      PcBhWVP.jpg -> 1024px
2014-01-12T15:34:07.601794   |  |  |--[metainfo]      BckKGdICUAAl7zp.jpg
2014-01-12T15:34:07.602157   |  |  |--[thumbing]
BckKGdICUAAl7zp.jpg -> 75px, square
2014-01-12T15:34:07.602316   |  |  |--[thumbing]
BckKGdICUAAl7zp.jpg -> 150px, square
2014-01-12T15:34:07.602463   |  |  |--[thumbing]
BckKGdICUAAl7zp.jpg -> 640px
2014-01-12T15:34:07.602607   |  |  |--[thumbing]
BckKGdICUAAl7zp.jpg -> 800px
2014-01-12T15:34:07.602753   |  |  |--[thumbing]
BckKGdICUAAl7zp.jpg -> 1024px
2014-01-12T15:34:07.602891   |  |  |--[metainfo]      yhnBRwI.jpg
2014-01-12T15:34:07.603210   |  |  |--[thumbing]      yhnBRwI.jpg ->
75px, square
2014-01-12T15:34:07.603367   |  |  |--[thumbing]      yhnBRwI.jpg ->
150px, square
2014-01-12T15:34:07.603513   |  |  |--[thumbing]      yhnBRwI.jpg -> 640px
2014-01-12T15:34:07.603659   |  |  |--[thumbing]      yhnBRwI.jpg -> 800px
2014-01-12T15:34:07.603805   |  |  |--[thumbing]      yhnBRwI.jpg -> 1024px
2014-01-12T15:34:07.603940   |  |  |--[metainfo]      ASKUrIv.jpg
2014-01-12T15:34:07.604251   |  |  |--[thumbing]      ASKUrIv.jpg ->
75px, square
2014-01-12T15:34:07.604408   |  |  |--[thumbing]      ASKUrIv.jpg ->
150px, square
2014-01-12T15:34:07.604555   |  |  |--[thumbing]      ASKUrIv.jpg -> 640px
2014-01-12T15:34:07.604701   |  |  |--[thumbing]      ASKUrIv.jpg -> 800px
2014-01-12T15:34:07.604847   |  |  |--[thumbing]      ASKUrIv.jpg -> 1024px
2014-01-12T15:34:07.605005   |  |  |--[metainfo]      mK60SU7.jpg
2014-01-12T15:34:07.605365   |  |  |--[thumbing]      mK60SU7.jpg ->
75px, square
2014-01-12T15:34:07.605523   |  |  |--[thumbing]      mK60SU7.jpg ->
150px, square
2014-01-12T15:34:07.605670   |  |  |--[thumbing]      mK60SU7.jpg -> 640px
2014-01-12T15:34:07.605816   |  |  |--[thumbing]      mK60SU7.jpg -> 800px
2014-01-12T15:34:07.605964   |  |  |--[thumbing]      mK60SU7.jpg -> 1024px
2014-01-12T15:34:07.606102   |  |  |--[metainfo]
ThePalmDeiraJul07CopyrightNakheel2S.jpg
2014-01-12T15:34:07.607627   |  |  |--[thumbing]
ThePalmDeiraJul07CopyrightNakheel2S.jpg -> 75px, square
2014-01-12T15:34:07.607798   |  |  |--[thumbing]
ThePalmDeiraJul07CopyrightNakheel2S.jpg -> 150px, square
2014-01-12T15:34:07.607946   |  |  |--[thumbing]
ThePalmDeiraJul07CopyrightNakheel2S.jpg -> 640px
2014-01-12T15:34:07.608093   |  |  |--[thumbing]
ThePalmDeiraJul07CopyrightNakheel2S.jpg -> 800px
2014-01-12T15:34:07.608238   |  |  |--[thumbing]
ThePalmDeiraJul07CopyrightNakheel2S.jpg -> 1024px
2014-01-12T15:34:07.608379   |  |  |--[metainfo]      YN6EfV5.jpg
2014-01-12T15:34:07.608726   |  |  |--[thumbing]      YN6EfV5.jpg ->
75px, square
2014-01-12T15:34:07.608906   |  |  |--[thumbing]      YN6EfV5.jpg ->
150px, square
2014-01-12T15:34:07.609051   |  |  |--[thumbing]      YN6EfV5.jpg -> 640px
2014-01-12T15:34:07.609194   |  |  |--[thumbing]      YN6EfV5.jpg -> 800px
2014-01-12T15:34:07.609335   |  |  |--[thumbing]      YN6EfV5.jpg -> 1024px
2014-01-12T15:34:07.609480   |  |  |--[metainfo]      635243866430725243.jpg
2014-01-12T15:34:07.609833   |  |  |--[thumbing]
635243866430725243.jpg -> 75px, square
2014-01-12T15:34:07.609987   |  |  |--[thumbing]
635243866430725243.jpg -> 150px, square
2014-01-12T15:34:07.610132   |  |  |--[thumbing]
635243866430725243.jpg -> 640px
2014-01-12T15:34:07.610275   |  |  |--[thumbing]
635243866430725243.jpg -> 800px
2014-01-12T15:34:07.610417   |  |  |--[thumbing]
635243866430725243.jpg -> 1024px
2014-01-12T15:34:07.611917   |  |  |--[metainfo]      captchas-illisibles.png
2014-01-12T15:34:07.612659   |  |  |--[thumbing]
captchas-illisibles.png -> 75px, square
2014-01-12T15:34:07.612834   |  |  |--[thumbing]
captchas-illisibles.png -> 150px, square
2014-01-12T15:34:07.613021   |  |  |--[thumbing]
captchas-illisibles.png -> 640px
2014-01-12T15:34:07.613168   |  |  |--[thumbing]
captchas-illisibles.png -> 800px
2014-01-12T15:34:07.613313   |  |  |--[thumbing]
captchas-illisibles.png -> 1024px
2014-01-12T15:34:07.613460   |  |  |--[walking]       Low polygen
wallpapers - Imgur
2014-01-12T15:34:07.615744   |  |  |--[full cache]    Low polygen
wallpapers - Imgur
2014-01-12T15:34:07.616250   |  |  |--[caching]       Low polygen
wallpapers - Imgur
2014-01-12T15:34:07.618499   |  |--[caching]       atrierpourquoifaire
Traceback (most recent call last):
  File "./main.py", line 21, in <module>
    main()
  File "./main.py", line 15, in main
    TreeWalker(sys.argv[1], sys.argv[2])
  File "/home/bsp/Téléchargements/PhotoFloat/scanner/TreeWalker.py",
line 16, in __init__
    self.walk(self.album_path)
  File "/home/bsp/Téléchargements/PhotoFloat/scanner/TreeWalker.py",
line 55, in walk
    album.add_album(self.walk(entry))
  File "/home/bsp/Téléchargements/PhotoFloat/scanner/TreeWalker.py",
line 55, in walk
    album.add_album(self.walk(entry))
  File "/home/bsp/Téléchargements/PhotoFloat/scanner/TreeWalker.py",
line 76, in walk
    album.cache(self.cache_path)
  File "/home/bsp/Téléchargements/PhotoFloat/scanner/PhotoAlbum.py",
line 68, in cache
    self._sort()
  File "/home/bsp/Téléchargements/PhotoFloat/scanner/PhotoAlbum.py",
line 51, in _sort
    self._photos.sort()
  File "/home/bsp/Téléchargements/PhotoFloat/scanner/PhotoAlbum.py",
line 318, in __cmp__
    date_compare = cmp(self.date, other.date)
TypeError: can't compare datetime.datetime to unicode


More information about the PhotoFloat mailing list