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

seattleinstaller fails on Windows #146

Open
aaaaalbert opened this issue Sep 24, 2014 · 14 comments
Open

seattleinstaller fails on Windows #146

aaaaalbert opened this issue Sep 24, 2014 · 14 comments

Comments

@aaaaalbert
Copy link
Contributor

@yyzhuang reports that the Seattle installer failed on Windows. The debug message shows that platform.architecture() returned 32 bits and WindowsPE, although it's a 64 bit machine. platform.release is empty altogether.

Given we include a very old version of Python in the Win installer (see #59), it's likely that the old platform detection code gets the OS string wrong, and maybe just reports that the Python binary is 32 bit instead of checking the /proc/cpuinfo equivalent of Windows.

In addition to the fix, the Win/Python version matrix in SeattleTestbed/attic#1059 needs to be amended.

@aaaaalbert
Copy link
Contributor Author

Here's the raw results for a Windows 8.1 Pro 32 bit machine (German locale). I didn't ever get an empty string for release, but architecture is WindowsPE throughout. Results are unchanged for cmd.exe and Windows PowerShell.

from platform import *
print "platform", platform()
print "system", system()
print "arch", architecture()
print "release", release()
print "version", version()

from sys import *
print "getwinver", getwindowsversion()





C:\Programme\Python25>python
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from platform import *
>>> platform()
'Windows-Vista-6.3.9600'
>>> system()
'Windows'
>>>
>>> architecture()
('32bit', 'WindowsPE')
>>> release()
'Vista'
>>> version()
'6.3.9600'
>>>
>>> from sys import *
>>> getwindowsversion()
(6, 2, 9200, 2, '')
>>>
^C
C:\Programme\Python25>ver

Microsoft Windows [Version 6.3.9600]




C:\Programme\Python265>python
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from platform import *
>>> print "platform", platform()
platform Windows-post2008Server-6.2.9200
>>> print "system", system()
system Windows
>>> print "arch", architecture()
arch ('32bit', 'WindowsPE')
>>> print "release", release()
release post2008Server
>>> print "version", version()
version 6.2.9200
>>>
>>> from sys import *
>>> print "getwinver", getwindowsversion()
getwinver (6, 2, 9200, 2, '')





C:\Programme\Python273>python
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from platform import *
>>> print "platform", platform()
platform Windows-post2008Server-6.2.9200
>>> print "system", system()
system Windows
>>> print "arch", architecture()
arch ('32bit', 'WindowsPE')
>>> print "release", release()
release post2008Server
>>> print "version", version()
version 6.2.9200
>>>
>>> from sys import *
>>> print "getwinver", getwindowsversion()
getwinver sys.getwindowsversion(major=6, minor=2, build=9200, platform=2, service_pack='')



Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from platform import *
>>> print "platform", platform()
platform Windows-8-6.2.9200
>>> print "system", system()
system Windows
>>> print "arch", architecture()
arch ('32bit', 'WindowsPE')
>>> print "release", release()
release 8
>>> print "version", version()
version 6.2.9200
>>>
>>> from sys import *
>>> print "getwinver", getwindowsversion()
getwinver sys.getwindowsversion(major=6, minor=2, build=9200, platform=2, service_pack='')

@XuefengHuang
Copy link

Here's the raw results for a Windows 7 64 bit machine. I find that platform.platform() returned windows-32 bit although it is a 64bit machine. But architecture is (64bit, windowsPE). platform.release() is empty. Results are unchanged for cmd.exe and Windows PowerShell.

C:\Users\huangxuefeng>python
Python 2.5.2 (r252:60911, Feb 21 2008, 13:17:27) [MSC v.1400 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from platform import *
>>> print "platform",platform()
platform Windows-32bit
>>> print "system", system()
system Windows
>>> print "arch", architecture()
arch ('64bit', 'WindowsPE')
>>> print "release", release()
release
>>> print "version", version()
version 32bit
>>> from sys import *
>>> print "getwinver", getwindowsversion()
getwinver (6, 1, 7601, 2, 'Service Pack 1')
>>>


C:\Users\huangxuefeng>python
Python 2.6.5 (r265:79096, Mar 19 2010, 18:02:59) [MSC v.1500 64 bit (AMD64)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from platform import *
>>> print "platform", platform()
platform Windows-post2008Server-6.1.7601-SP1
>>> print "system", system()
system Windows
>>> print "arch", architecture()
arch ('64bit', 'WindowsPE')
>>> print "release", release()
release post2008Server
>>> print "version", version()
version 6.1.7601
>>> from sys import *
>>> print "getwinver", getwindowsversion()
getwinver (6, 1, 7601, 2, 'Service Pack 1')
>>>


C:\Users\huangxuefeng>python
Python 2.7.8 (default, Jun 30 2014, 16:08:48) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from platform import *
>>> print "platform", platform()
platform Windows-7-6.1.7601-SP1
>>> print "system", system()
system Windows
>>> print "arch", architecture()
arch ('64bit', 'WindowsPE')
>>> print "release", release()
release 7
>>> print "version", version()
version 6.1.7601
>>> from sys import *
>>> print "getwinver", getwindowsversion()
getwinver sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, servic
e_pack='Service Pack 1')
>>>

@XuefengHuang
Copy link

I run Seattle installer on windows 7 pro 64bit with python2.5 or python2.7. Python 2.5 cannot work but python2.7 works. So updating python version is a solution to fix this issue. Here are my test results.

This is running on python2.5

C:\Users\huangxuefeng\Desktop\seattle>install.bat
Traceback (most recent call last):
  File "seattleinstaller.py", line 2314, in <module>
    main()
  File "seattleinstaller.py", line 2139, in main
    if test_seattle_is_installed():
  File "seattleinstaller.py", line 2034, in test_seattle_is_installed
    get_filepath_of_win_startup_folder_with_link_to_seattle()
  File "seattleinstaller.py", line 286, in get_filepath_of_win_startup_folder_wi
th_link_to_seattle
    "\nPlatform version string: " + str(platform.version()))
__main__.UnsupportedOSError:
Sorry, we couldn't detect your Windows version.
Please contact the Seattle development team at

   [email protected]

to resolve this issue. Version details:
Python version: 2.5.2
Platform arch: ('32bit', 'WindowsPE')
Platform release:
Platform version string: 32bit

This is running on python2.7

C:\Users\huangxuefeng\Desktop\seattle1>install.bat
System benchmark starting...
Benchmark complete and vessels created!
Customizing seattle batch files...
Done!
Preparing Seattle to run automatically at startup...
Seattle is setup to run at startup!
Generating the Node Manager RSA keys.  This may take a few minutes...
Keys generated!
Starting seattle...
seattle has been installed!
To learn more about useful, optional scripts related to running seattle, see the
 README file.

C:\Users\huangxuefeng\Desktop\seattle1>uninstall.bat
Seattle has been successfully uninstalled.  It is now safe to remove all Seattle
 files and directories from your system.

@asm582
Copy link

asm582 commented Nov 9, 2014

Hi Tested the above ticket for pythn 2.5.1, 2.5.2, 2.5.4 and 2.7.5 and it works well in call cases. below is the trace:-

C:\Users\swap\Desktop\seattle_win\seattle>python
Python 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] on win
32
Type "help", "copyright", "credits" or "license" for more information.

from platform import *
print "platform", platform()
platform Windows-8-6.2.9200
print "system", system()
system Windows
print "arch", architecture()
arch ('64bit', 'WindowsPE')
print "release", release()
release 8
print "version", version()
version 6.2.9200
from sys import *
print "getwinver", getwindowsversion()
getwinver sys.getwindowsversion(major=6, minor=2, build=9200, platform=2, servic
e_pack='')


C:\Users\swap>python
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.

^V
File "", line 1

^
SyntaxError: invalid syntax
from platform import *
print "platform", platform()
platform Windows-Vista-6.3.9600
print "arch", architecture()
arch ('32bit', 'WindowsPE')
print "system", system()
system Windows
print "release", release()
release Vista
print "version", version()
version 6.3.9600
from sys import *
print "getwinver", getwindowsversion()
getwinver (6, 2, 9200, 2, '')


C:\Users\swap\Desktop\seattle_win\seattle>python
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
from platform import *
print "platform", platform()
platform Windows-Vista-6.3.9600
print "system", system()
system Windows
print "arch", architecture()
arch ('32bit', 'WindowsPE')
print "release", release()
release Vista
print "version", version()
version 6.3.9600
from sys import *
print "getwinver", getwindowsversion()
getwinver (6, 2, 9200, 2, '')


C:\Users\swap\Desktop\seattle_win\seattle>python
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.

from platform import *
print "platform", platform()
platform Microsoft-Windows-32bit-WindowsPE
print "system", system()
system Microsoft
print "arch", architecture()
arch ('32bit', 'WindowsPE')
print "release", release()
release Windows
print "version", version()
version 6.3.9600
from sys import *
print "getwinver", getwindowsversion()
getwinver (6, 2, 9200, 2, '')

@XuefengHuang
Copy link

I tested repyV1 before and it works for python2.7. But when I test repyV2 for python2.5 or 2.7, they can't work. Python2.5 result is the same as repyV1. Here is python2.7 result:

 C:\Users\huangxuefeng\Desktop\seattle>python seattleinstaller.py
System benchmark starting...
Failed to benchmark Windows OS.
The above benchmarking error(s) occurred.
If you choose to continue anyways then default values will be used for failed be
nchmarks.
Failed.
This install cannot succeed either because required installation info is corrupt
ed or resources are insufficient.
Please email the Seattle project for additional support, and attach the installe
r_benchmark.log and vesselinfo files, found in the seattle_repy directory, in or
der to help us diagnose the issue.

@aaaaalbert
Copy link
Contributor Author

Okay, thanks for testing. What does installer_benchmark.log contain?

@XuefengHuang
Copy link

installer_benchmark.log contains:

New installation, beginning benchmark.
Failed to benchmark Windows OS.
Traceback (most recent call last):
  File "C:\Users\huangxuefeng\Desktop\seattle\benchmark_resources.py", line 221, in    run_benchmark
  File "C:\Users\huangxuefeng\Desktop\seattle\Win_WinCE_resources.py", line 89, in  measure_resources
AttributeError: 'module' object has no attribute 'MobileCE'
Traceback (most recent call last):
  File "seattleinstaller.py", line 1755, in perform_system_benchmarking
  File "C:\Users\huangxuefeng\Desktop\seattle\benchmark_resources.py", line 548, in main
  File "C:\Users\huangxuefeng\Desktop\seattle\benchmark_resources.py", line 340, in run_benchmark
UnboundLocalError: local variable 'is_android' referenced before assignment

@aaaaalbert
Copy link
Contributor Author

With "repyV1" and "repyV2" you mean installers from seattleclearinghouse.poly.edu and sensibilityclearinghouse.poly.edu, right?

@XuefengHuang
Copy link

I download from https://seattleclearinghouse.poly.edu/download/flibble/. It is repyV1. And I download repyV2 from https://github.com/SeattleTestbed/repy_v2.

@aaaaalbert
Copy link
Contributor Author

Use an installer from https://sensibilityclearinghouse.poly.edu/geni/download/altruistic/ to test RepyV2 installation.

@XuefengHuang
Copy link

Okay. I have tested repyV2. It works on windows 7 pro 64bit with python2.7. We don't need to modify seattleinstaller.py when updating to python2.7

C:\seattle>install.bat
System benchmark starting...
Benchmark complete and vessels created!
Customizing seattle batch files...
Done!
Preparing Seattle to run automatically at startup...
Seattle is setup to run at startup!
Generating the Node Manager RSA keys.  This may take a few minutes...
Keys generated!
Starting seattle...
seattle has been installed!
To learn more about useful, optional scripts related to running seattle, see the
 README file.

C:\seattle>uninstall.bat
Seattle has been successfully uninstalled.  It is now safe to remove all Seattle
 files and directories from your system.

@asm582
Copy link

asm582 commented Nov 13, 2014

If you check platform.release() it returns value as '8' for windows 8 in latest python version...

@XuefengHuang
Copy link

Thanks! I don't test it on windows 8 machine. So it can't work fine in windows 8? Maybe we should add release == 8 to support window 8 system.

@aaaaalbert
Copy link
Contributor Author

PR proposing the fix: #150. @asm582 and other owners of Windows 8+ machines, please test this and report back!

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

3 participants