Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Randomly appearing issue with random generator #9

Open
halfdan opened this issue Mar 13, 2013 · 0 comments
Open

Randomly appearing issue with random generator #9

halfdan opened this issue Mar 13, 2013 · 0 comments

Comments

@halfdan
Copy link

halfdan commented Mar 13, 2013

Not sure what causes this, but I sometimes run into this. After a restart everything works fine.

Traceback (most recent call last):
  File "./google2piwik.py", line 665, in <module>
    export_period(start_date, end_date)
  File "./google2piwik.py", line 72, in export_period
    export_day(str(currentdate), fetcher)
  File "./google2piwik.py", line 132, in export_day
    simulator.finalize(additional)
  File "./google2piwik.py", line 406, in finalize
    visit.finalize(additional)
  File "./google2piwik.py", line 281, in finalize
    self.set_final_value("md5config", hash_generator.get_md5(self.get_final_value("visit_server_date")))
  File "./google2piwik.py", line 427, in get_md5
    self.populate_current_date()
  File "./google2piwik.py", line 442, in populate_current_date
    self.date_basket = chain(not_yet_taken, cycle(random.sample(self.month_basket, self.date_unique[self.current_date] - len(not_yet_taken))) )
  File "/usr/lib/python2.6/random.py", line 316, in sample
    raise ValueError, "sample larger than population"
ValueError: sample larger than population
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant