Post Deleted by Community
    Post Locked by Community
    Post Migrated Away to webmasters.stackexchange.com by mpdonadio
    Post Closed as "off-topic" by mpdonadio
2 updated issue after achieving partially successful progress
source | link

Although this involves a Drupal site, the question is more at the server level, I think.

BACKGROUND: Site uses modules "Election" and "Election OpenSTV Integration, the latter one being involved in counting votes from the election. It must link to "OpenSTV" code, a set of apps which run in Python, which must also be installed on the server.

PROGRESS SO FAR: The whole system was set up on a local Mac-based dev site, using the Mac version of Python and linking to the OpenSTV code on that computer. Election counting worked.

NEW ENVIRONMENT REQUIRED for Production Site: The site was migrated (actually, re-created) on the Windows IIS server where it needs to reside. All needed modules were installed, a Windows version of Python was installed, and the OpenSTV code directories were installed. The one remaining step is that the "Elections OpenSTV Integration" module needs to be given a valid path to a file "runElection.py" which is within the same set of directories as used in the Mac environment.

THE PROBLEM: A path must be provided in a config field for the OpenSTV Integration module. The path that worked in the Mac environment was:

/Users/myname/Documents/openstv-master/openstv/runElection.py

In the Windows IIS environment, when I clickafter much trial and "copy address as text" for theerror we found a path location currently chosen for this code, thesyntax that saves and does not generate a "cannot be executed" error as we were getting in earlier attempts. That path is:  

C:\Users\openstv\Python34\python.exe C:\inetpub\wwwroot\naccas-master\openstv\runElectionelections\sites\all\libraries\openstv-master\openstv/runElection.py

however that is not accepted. ("...cannotWe had assumed if it doesn't generate the "cannot be executed.") I have tried variations of this pathexecuted" error, with/without "C:" andthere must not be any problem with forward slashes vs. back slasheseither the path or permissions to execute.

It is not clear if the problem isHowever when I am logged in with the syntax ofappropriate permissions and go to the path statement, or from some other source. Does anyone havesite's OpenSTV tab (in a suggestion for howtest election which has some votes recorded) and try to correctexport results, what I get suggests it's not working. In the problemlocalized Mac dev site, or howI could choose to isolate whether it'sexport HTML and would get a path problemzipped folder of HTML files which displayed as expected. In this production version on the IIS server, the same export command does generate a permissions problem.zip file – but attempts to unzip it generate another single file of the form "SandBox-Election-SNTV-HtmlReport.zip.cpgz" – so, or something relatedappending ".cpgz" to runningthe original export.

What could be going wrong in this case? Is there any reason why the OpenSTV code (v. 1.7) wouldn't run in the Windows IIS server environment, even though a compatible Python version is installed? Is there an alternative to consider? 

To provide context: The image below shows the configuration field as presented by the OpenSTV Integration module; what's in the field is just a default: enter image description herescreenshot of OpenSTV Integration config dialogue

Although this involves a Drupal site, the question is more at the server level, I think.

BACKGROUND: Site uses modules "Election" and "Election OpenSTV Integration, the latter one being involved in counting votes from the election. It must link to "OpenSTV" code, a set of apps which run in Python, which must also be installed on the server.

PROGRESS SO FAR: The whole system was set up on a local Mac-based dev site, using the Mac version of Python and linking to the OpenSTV code on that computer. Election counting worked.

NEW ENVIRONMENT REQUIRED for Production Site: The site was migrated (actually, re-created) on the Windows IIS server where it needs to reside. All needed modules were installed, a Windows version of Python was installed, and the OpenSTV code directories were installed. The one remaining step is that the "Elections OpenSTV Integration" module needs to be given a valid path to a file "runElection.py" which is within the same set of directories as used in the Mac environment.

THE PROBLEM: A path must be provided in a config field for the OpenSTV Integration module. The path that worked in the Mac environment was:

/Users/myname/Documents/openstv-master/openstv/runElection.py

In the Windows IIS environment, when I click and "copy address as text" for the path location currently chosen for this code, the path is:  

C:\Users\openstv-master\openstv\runElection.py

however that is not accepted. ("...cannot be executed.") I have tried variations of this path, with/without "C:" and with forward slashes vs. back slashes.

It is not clear if the problem is with the syntax of the path statement, or from some other source. Does anyone have a suggestion for how to correct the problem, or how to isolate whether it's a path problem, a permissions problem, or something related to running Python?

The image below shows the configuration field as presented by the OpenSTV Integration module; what's in the field is just a default: enter image description here

Although this involves a Drupal site, the question is more at the server level, I think.

BACKGROUND: Site uses modules "Election" and "Election OpenSTV Integration, the latter one being involved in counting votes from the election. It must link to "OpenSTV" code, a set of apps which run in Python, which must also be installed on the server.

PROGRESS SO FAR: The whole system was set up on a local Mac-based dev site, using the Mac version of Python and linking to the OpenSTV code on that computer. Election counting worked.

NEW ENVIRONMENT REQUIRED for Production Site: The site was migrated (actually, re-created) on the Windows IIS server where it needs to reside. All needed modules were installed, a Windows version of Python was installed, and the OpenSTV code directories were installed. The one remaining step is that the "Elections OpenSTV Integration" module needs to be given a valid path to a file "runElection.py" which is within the same set of directories as used in the Mac environment.

THE PROBLEM: A path must be provided in a config field for the OpenSTV Integration module. The path that worked in the Mac environment was:

/Users/myname/Documents/openstv-master/openstv/runElection.py

In the Windows IIS environment, after much trial and error we found a path syntax that saves and does not generate a "cannot be executed" error as we were getting in earlier attempts. That path is:

C:\Python34\python.exe C:\inetpub\wwwroot\naccas-elections\sites\all\libraries\openstv-master\openstv/runElection.py

We had assumed if it doesn't generate the "cannot be executed" error, there must not be any problem with either the path or permissions to execute.

However when I am logged in with appropriate permissions and go to the site's OpenSTV tab (in a test election which has some votes recorded) and try to export results, what I get suggests it's not working. In the localized Mac dev site, I could choose to export HTML and would get a zipped folder of HTML files which displayed as expected. In this production version on the IIS server, the same export command does generate a .zip file – but attempts to unzip it generate another single file of the form "SandBox-Election-SNTV-HtmlReport.zip.cpgz" – so, appending ".cpgz" to the original export.

What could be going wrong in this case? Is there any reason why the OpenSTV code (v. 1.7) wouldn't run in the Windows IIS server environment, even though a compatible Python version is installed? Is there an alternative to consider? 

To provide context: The image below shows the configuration field as presented by the OpenSTV Integration module; what's in the field is just a default: screenshot of OpenSTV Integration config dialogue

1
source | link

OpenSTV Integration configuration on Windows IIS server

Although this involves a Drupal site, the question is more at the server level, I think.

BACKGROUND: Site uses modules "Election" and "Election OpenSTV Integration, the latter one being involved in counting votes from the election. It must link to "OpenSTV" code, a set of apps which run in Python, which must also be installed on the server.

PROGRESS SO FAR: The whole system was set up on a local Mac-based dev site, using the Mac version of Python and linking to the OpenSTV code on that computer. Election counting worked.

NEW ENVIRONMENT REQUIRED for Production Site: The site was migrated (actually, re-created) on the Windows IIS server where it needs to reside. All needed modules were installed, a Windows version of Python was installed, and the OpenSTV code directories were installed. The one remaining step is that the "Elections OpenSTV Integration" module needs to be given a valid path to a file "runElection.py" which is within the same set of directories as used in the Mac environment.

THE PROBLEM: A path must be provided in a config field for the OpenSTV Integration module. The path that worked in the Mac environment was:

/Users/myname/Documents/openstv-master/openstv/runElection.py

In the Windows IIS environment, when I click and "copy address as text" for the path location currently chosen for this code, the path is:

C:\Users\openstv-master\openstv\runElection.py

however that is not accepted. ("...cannot be executed.") I have tried variations of this path, with/without "C:" and with forward slashes vs. back slashes.

It is not clear if the problem is with the syntax of the path statement, or from some other source. Does anyone have a suggestion for how to correct the problem, or how to isolate whether it's a path problem, a permissions problem, or something related to running Python?

The image below shows the configuration field as presented by the OpenSTV Integration module; what's in the field is just a default: enter image description here