Help test Helios on python3!

134 views
Skip to first unread message

Ben Adida

unread,
Jan 30, 2021, 1:53:51 PM1/30/21
to Helios Voting
Helios friends!

Thanks to many of you, including Marco Ciotola and Warwick McNaughton, I'm close to bringing the official Helios version up to Python3. I've deployed it at:


If you have a few minutes to test things out, please do and report back in this thread.

-Ben

Spacial

unread,
Jan 30, 2021, 2:27:26 PM1/30/21
to helios...@googlegroups.com
I made a little (very tiny) test (creation, bulk [with 2 emails], etc..)

appears good.

=)

Spacial

--
--
Helios Voting Google Group
To post: helios...@googlegroups.com
To unsubscribe: helios-votin...@googlegroups.com
More: http://groups.google.com/group/helios-voting?hl=en

---
You received this message because you are subscribed to the Google Groups "Helios Voting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to helios-votin...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/helios-voting/CAPjo0fOw-QSCoBHh_sdk_Swtx7-zt3N7R5SYbn6Qb-Ct4w62Kg%40mail.gmail.com.

Oleksa Stasevych

unread,
Jan 30, 2021, 5:30:41 PM1/30/21
to Helios Voting
Hi!

Thanks, I copied warwicks repo and trying to adapt it, in particular by adding the multilanguage support. I see your one has less bugs.

Ben, I am testing your version on python3 and finding the same bug: The date/time in the election settings is not saved
ben-helios-test-date-error.jpg

I have some more ideas:
  • to add the field to manually add emails of voters?
  • to follow a manager to the window with sending invitation emails to vote just after starting voting
  • to limit those who may create elections to the defined list
  • to add encrypted password authentication (eg, using md5)
  • to let create separate template apart of DEBUG
  • of course, in some lucky moment to add localisation - I am struggling with it now:)
Ben, please, share the link to your updated repo. I would like reuse it as well.

Thanks a lot!

BR, Oleksa

Oleksa Stasevych

unread,
Jan 30, 2021, 6:06:19 PM1/30/21
to Helios Voting
It works fine! Everything apart the date/time settings is ok.

Ben Adida

unread,
Jan 30, 2021, 8:22:21 PM1/30/21
to Helios Voting

Yes, that's a separate issue that I'll look to fixing once we've upgraded to python3. I don't want to wait on this update any longer, it's been too long already :)

--
--
Helios Voting Google Group
To post: helios...@googlegroups.com
To unsubscribe: helios-votin...@googlegroups.com
More: http://groups.google.com/group/helios-voting?hl=en

---
You received this message because you are subscribed to the Google Groups "Helios Voting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to helios-votin...@googlegroups.com.

Jean Martina

unread,
Jan 31, 2021, 4:00:23 AM1/31/21
to helios...@googlegroups.com

I got this error:

This file works fine on the python2 version.


Jean

--
--
Helios Voting Google Group
To post: helios...@googlegroups.com
To unsubscribe: helios-votin...@googlegroups.com
More: http://groups.google.com/group/helios-voting?hl=en

---
You received this message because you are subscribed to the Google Groups "Helios Voting" group.
To unsubscribe from this group and stop receiving emails from it, send an email to helios-votin...@googlegroups.com.

Ben Adida

unread,
Jan 31, 2021, 9:35:18 PM1/31/21
to Helios Voting

Good catch! Looks like the default behavior in the new validate-email package checks a *lot* more, including proper MX records, sending a HELO, etc., that the python-2 version did not.

I think this is because the package changed. I'm going to try to change it back.

-Ben


Ben Adida

unread,
Jan 31, 2021, 9:41:23 PM1/31/21
to Helios Voting

Yep, changed it back to the other package, and things are looking good now. Thanks Jean!

-Ben

Tom Thomas

unread,
Feb 4, 2021, 3:15:06 PM2/4/21
to Helios Voting
Ben, would you like me to put the system under some level of load?  With your permission I can stuff in a couple hundred ballots via automation to ensure everything acts as intended during the voting and tabulation processes.  This is a real world simulation end-to-end through the URL you provided just as if actual voters had done it for an election.

Want to ask before you think you have a DOS attack.

Will also give it a once over for general functionality while at it.

Excited to give this version a spin around the block!


Tom

Ben Adida

unread,
Feb 4, 2021, 3:36:41 PM2/4/21
to Helios Voting

Tom Thomas

unread,
Feb 4, 2021, 3:59:45 PM2/4/21
to Helios Voting
Excellent!  I'll fire up the juggernaut this evening and have it stuff in ballots for a few hours.

Oleksa Stasevych

unread,
Feb 4, 2021, 4:28:11 PM2/4/21
to Helios Voting
Hi Ben.

I tried to place your code on my heroku test instance and found that it is python2 (got error). Am I right in taking it from this branch https://github.com/benadida/helios-server/tree/bens-cleaned-up-py3?

BR, Oleksa

Ben Adida

unread,
Feb 4, 2021, 4:45:43 PM2/4/21
to Helios Voting

Hi Oleksa,

That is the right branch, it should be python3... are you sure you're on the branch?

-Ben

Oleksa Stasevych

unread,
Feb 4, 2021, 5:16:18 PM2/4/21
to Helios Voting
Oh, that is strange, now I see updated files in the branch... Will try again. Thanks, Ben!

Oleksa Stasevych

unread,
Feb 4, 2021, 7:08:59 PM2/4/21
to Helios Voting
Hey, Ben!

I tried just overwrite the files from warwick's repo in my heroku git repo and faced with a lot of mistakes.. Do you have settings which matches to heroku hosting?

BR, Oleksa

On Thursday, 4 February 2021 at 23:45:43 UTC+2 Ben Adida wrote:

Ben Adida

unread,
Feb 6, 2021, 1:00:30 PM2/6/21
to Helios Voting

Hi Tom,

Any feedback on the load testing? I'm feeling ready to merge the code, but would love any final bits of input before I do.

-Ben

Tom Thomas

unread,
Feb 6, 2021, 8:39:09 PM2/6/21
to Helios Voting
Apologies for the delay Ben.  I've uploaded 2000 pins without issue.  The stress tester is running now.

I had a slight brain hiccup realizing I don't have access to pull the 2K pins directly to load into my stress tester.  I've gone ahead and by hand pulled 20 pins and am running those through 400 times.

If you can/want to send me all 2000 passwords for election ID:  e2c90d98-68df-11eb-9f7c-1e8706539e63  I would be more than happy to run all 2000 unique ballots through.

Let me know.  And I will tabulate as-is, or run all the pins through.


Tom

Tom Thomas

unread,
Feb 6, 2021, 9:58:28 PM2/6/21
to Helios Voting
400 ballots (20 unique voters) entered without issue.  System seems stable under voting load.  Would love to do a large tabulation if you can get me my passwords.  Will hang tight for now and not tabulate.

Tom Thomas

unread,
Feb 8, 2021, 1:06:33 AM2/8/21
to Helios Voting
Once all 2000 unique votes had been cast, tabulated in a couple seconds.  Everything looks good Ben!

Ben Adida

unread,
Feb 8, 2021, 1:51:01 AM2/8/21
to Helios Voting
Woohoo! I'm going to merge :)

Oleksa Stasevych

unread,
Feb 9, 2021, 6:56:19 PM2/9/21
to Helios Voting
Hi Ben, all!

I made a fork of your repo and added some changes, mostly about localisation. Let me invite you to check it over here, if you have a time https://github.com/ostasevych/helios-server-ostasevych-heroku-py3-localised/

BR, Oleksa

Oleksa Stasevych

unread,
Feb 13, 2021, 2:20:55 PM2/13/21
to Helios Voting
Hi!

I am getting "can't compare offset-naive and offset-aware datetimes" error when setting up the date for the end of elections.

In the traceback I see this part of the error:

File "/app/helios/models.py" in voting_has_stopped
  356.     return (voting_end is not None and datetime.datetime.utcnow() >= voting_end) or self.encrypted_tally

Exception Type: TypeError at /uk-ua/helios/elections/36dc919b-e29c-4f7f-81ea-5f714283213e/view
Exception Value: can't compare offset-naive and offset-aware datetimes

Oleksa Stasevych

unread,
Feb 13, 2021, 2:32:33 PM2/13/21
to Helios Voting
This error appears if I set use_tz = True, as the models.py explicitly mentions the function datetime.datetime.utcnow() instead of datetime.datetime.now(). See more at https://stackoverflow.com/questions/15307623/cant-compare-naive-and-aware-datetime-now-challenge-datetime-end 
So, the question, may we use local timezone at all?

BR, Oleksa

Ben Adida

unread,
Feb 13, 2021, 2:34:42 PM2/13/21
to Helios Voting

Hi Oleksa,

That URL doesn't work for me.

If you are off on your own fork, you'll definitely want to be careful about how you add code, because bringing in upstream changes (changes from my repository) can be tricky. The right way to do this is by rebasing your changes on upstream changes. Here's a quick guide on how to do that:


The only part that I would urge you to be careful about is the last instruction in that guide, with git push --force, which will overwrite your github server's history with the new rebased history.

If your changes conflicts with upstream changes, you'll also have some conflicts to resolve.

I hope this helps,

-Ben

Oleksa Stasevych

unread,
Feb 13, 2021, 5:36:41 PM2/13/21
to Helios Voting
Hi! Many thanks for this. I will try to master it in some moment, by now I am just copying and pasting your files manually to my repo...

Ben, I also found that the sandwich dropdown menu is not working on a small screens... From here I found that probably some jquery may be missing?
Additionally, I suggest to add to server_ui/templates/base.html the reference to main.css, which is missing and thus breaking the style, eg padding.

BR, Oleksa

Oleksa Stasevych

unread,
Feb 16, 2021, 1:44:08 PM2/16/21
to Helios Voting
Hi! I found that the function of printing the ballot tracker is not working. It doesn't show anything in fact.print-func.jpg

Ben Adida

unread,
Feb 16, 2021, 2:11:46 PM2/16/21
to Helios Voting

Thanks Oleksa! Can you file a ticket and add the screenshot?

-Ben

Oleksa Stasevych

unread,
Feb 17, 2021, 6:35:39 AM2/17/21
to Helios Voting
Hi! Another severe issue which broke my ongoing election: python3 sets limitation to the length of the email name... :((( I uploaded 100 accounts and need them check each one to identify which one is not sent email invitation to vote. Is it possible to find quick fix for that?

BR Oleksa

Oleksa Stasevych

unread,
Feb 17, 2021, 2:28:41 PM2/17/21
to Helios Voting
More details about the trouble with email names (From field), which contain long names of users (in Ukraine, eg. we have name+father's name+family name in cyrillic) and exceeds 75 characters. I am getting specifically this mistake 

ValueError('invalid arguments; address parts cannot contain CR or LF',)

which leads to not sending email to the recipient.

The system doesn't allow to understand who haven't received invitation message thus bringing troubles to managers :(((( 

Here you may find the ticket registered in django.

What I suggest is to provide the warning limitation before uploading the users to the system in the form of the table, so the managers may see which voter's name exceeds the length, and suggest 3 options:
  1. upload only those voters, whose name pass the test in 75 chars
  2. automatically cut the names of those who are not passing and upload
  3. show details and let managers to decide what to do.
What do you think about this? 

Oleksa Stasevych

unread,
Feb 17, 2021, 2:29:32 PM2/17/21
to Helios Voting

Warwick McNaughton

unread,
Feb 17, 2021, 6:51:21 PM2/17/21
to helios...@googlegroups.com
Hi Oleksa

Noticed there is discussion about this here:

Half-way down the page there is the comment:  Oh, it needs a non-ascii character to trigger encoding in the first place:
Hence triggered by Cyrillic characters??

It appears to be a python security issue which is solved here:

Might be a matter of updating your Python??

Warwick


Oleksa Stasevych

unread,
Feb 25, 2021, 6:22:33 PM2/25/21
to Helios Voting
Hi Warwick!

I haven't got from the email the end of the discussion. As I have been using Ben's repo, than it uses python 3.6.12. Should I try 3.8 or later?..

BR, Oleksa

Warwick McNaughton

unread,
Feb 25, 2021, 6:44:06 PM2/25/21
to helios...@googlegroups.com
Here are Heroku’s supported versions:

You could go to 3.6.13.

Just tried putting 3.9.2 in runtime.txt and deployed to Heroku.  Seems to work but I haven’t given it a full test.

Warwick


Reply all
Reply to author
Forward
0 new messages