1

I have been trying to use TimeManager to make a spatiotemporal map of artefacts found on a archaeological site.

My goal is to show if there is areas on the site wich concentrates artefacts having the same chronology and then to show how it is changing in time.

I have a vector layer based on a .csv containing attributes like this for example.

Bronze sword / X coordinate / Y coordinate / 99-01-01 (start) / 140/01/01 (end)

everytime I press play i got something like that :

Traceback (most recent call last):
  File "/Users/Antoine/.qgis2/python/plugins/timemanager/timemanagercontrol.py", line 314, in playAnimation
    stepFunction()
  File "/Users/Antoine/.qgis2/python/plugins/timemanager/timemanagercontrol.py", line 353, in stepForward
    self.timeLayerManager.stepForward()
  File "/Users/Antoine/.qgis2/python/plugins/timemanager/timelayermanager.py", line 222, in stepForward
    self.setCurrentTimePosition(self.getCurrentTimePosition() + self.timeFrame())
  File "/Users/Antoine/.qgis2/python/plugins/timemanager/timelayermanager.py", line 217, in setCurrentTimePosition
    self.refreshTimeRestrictions()
  File "/Users/Antoine/.qgis2/python/plugins/timemanager/timelayermanager.py", line 136, in refreshTimeRestrictions
    timeLayer.setTimeRestriction(self.getCurrentTimePosition(),self.timeFrame())
  File "/Users/Antoine/.qgis2/python/plugins/timemanager/timevectorlayer.py", line 193, in setTimeRestriction
    self.getDateType(), date_format=self.getTimeFormat(), query_idiom=idiom)
  File "/Users/Antoine/.qgis2/python/plugins/timemanager/query_builder.py", line 109, in build_query
    sub1=create_ymd_substring(ioy,iom,iod,from_attr,quote_type='"') # quote type for column
  File "/Users/Antoine/.qgis2/python/plugins/timemanager/query_builder.py", line 71, in create_ymd_substring
    ystr = "SUBSTR({}{}{},{},{})".format(q,col,q, ioy+1,ioy+5) if ioy>=0 else None # adding 1
UnicodeEncodeError: 'ascii' codec can't encode character u'\u017d' in position 6: ordinal not in range(128)

I'm new to QGIS so I don't really now what it means.

It would be really interesting if we could manage to make TimeManager work for archaeological use!

  • probably before you accuse timemanager you should make your time data more normalized. I see slash for one date and dash for another. also I don't think 140/01/01 (end)140 is going to pass a year test. – Brad Nesom Mar 24 '15 at 16:07
3

The Exception is occurring when time manager tries to parse the date string but finds a unicode character \u017d (a "Ž" symbol) instead.

Is your CSV file formatted correctly ?

|improve this answer|||||
1

maintainer of plugin here - seems the CSV is not formatted correctly. It seems there is something wrong with the header line (some extra characters). Also the dates need to be normalized, all the same format and with the proper zero padding. All these have nothing to do with the plugin, it's just input requirements for dates and csvs.

However, there were in fact some issues with years<1000 which have hopefully been fixed with a recent commit. Please try with the most recent version. More info on Github: https://github.com/anitagraser/TimeManager/issues/113

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.