arthur-debert / google-code-issues-migrator

A simple script to migrate issues from google code to github.
67 stars 56 forks source link

"x days ago" date format causes failure #3

Closed joshsh closed 12 years ago

joshsh commented 13 years ago

For my project, the script successfully retrieved all of the older issues in the list. More recent issues, however, caused failure on account of differently-formatted dates:

ValueError: time data 'Apr 5 (2 days ago)' does not match format '%b %d, %Y'

After I had deleted (not merely closed) the issues in question, the script succeeded.

ceefour commented 12 years ago

Also got this problem:

Traceback (most recent call last):
  File "migrateissues.py", line 143, in <module>
    process_issues(issues_data)
  File "migrateissues.py", line 126, in process_issues
    issues = [Issue(issue_line) for issue_line in reader]
  File "migrateissues.py", line 38, in __init__
    self.get_original_data() 
  File "migrateissues.py", line 56, in get_original_data
    self.created_at = datetime.datetime.strptime(created_at_raw, '%b %d, %Y')
  File "/usr/lib/python2.7/_strptime.py", line 325, in _strptime
    (data_string, format))
ValueError: time data 'Oct 27 (5 days ago)' does not match format '%b %d, %Y'
ceefour commented 12 years ago

I have fixed this on https://github.com/ceefour/google-code-issues-migrator

pull request is on the way

joelpt commented 12 years ago

Pulled ceefour's commit. Later switched to Google Code Projects Hosting API which does not require the date parsing that is the subject of this issue.