question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Various problems on Windows

See original GitHub issue

I am not sure if Windows is supported, and what functionality should be expected (all/same as on *nix?).

Here are various problems I am seeing on Windows 10:

  • Python 2.7.13:
ttimo_000@VANGUARD /c/d/R/Thespian> /cygdrive/c/Python27/python.exe setup.py test
running test
running egg_info
writing thespian.egg-info\PKG-INFO
writing top-level names to thespian.egg-info\top_level.txt
writing dependency_links to thespian.egg-info\dependency_links.txt
reading manifest file 'thespian.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.txt' under directory 'contrib'
warning: no files found matching '*.txt' under directory 'examples'
writing manifest file 'thespian.egg-info\SOURCES.txt'
running build_ext
thespian.test.test_load (unittest.loader.ModuleImportFailure) ... ERROR
thespian.test.test_runcommand (unittest.loader.ModuleImportFailure) ... ERROR

======================================================================
ERROR: thespian.test.test_load (unittest.loader.ModuleImportFailure)
----------------------------------------------------------------------
ImportError: Failed to import test module: thespian.test.test_load
Traceback (most recent call last):
  File "C:\Python27\lib\unittest\loader.py", line 254, in _find_tests
    module = self._get_module_from_name(name)
  File "C:\Python27\lib\unittest\loader.py", line 232, in _get_module_from_name
    __import__(name)
  File "d:\roomored\thespian\thespian\test\test_load.py", line 141, in <module>
    'stream': open('/dev/null','w'),
IOError: [Errno 2] No such file or directory: '/dev/null'


======================================================================
ERROR: thespian.test.test_runcommand (unittest.loader.ModuleImportFailure)
----------------------------------------------------------------------
ImportError: Failed to import test module: thespian.test.test_runcommand
Traceback (most recent call last):
  File "C:\Python27\lib\unittest\loader.py", line 254, in _find_tests
    module = self._get_module_from_name(name)
  File "C:\Python27\lib\unittest\loader.py", line 232, in _get_module_from_name
    __import__(name)
  File "d:\roomored\thespian\thespian\test\test_runcommand.py", line 5, in <module>
    import thespian.runcommand
  File "d:\roomored\thespian\thespian\runcommand.py", line 18, in <module>
    import fcntl,os
ImportError: No module named fcntl


----------------------------------------------------------------------
Ran 2 tests in 0.000s

FAILED (errors=2)
Test failed: <unittest.runner.TextTestResult run=2 errors=2 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=2 errors=2 failures=0>
  • Python 3.6:

Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)]

ttimo_000@VANGUARD /c/d/R/Thespian> /cygdrive/c/Python36/python.exe setup.py test
running test
running egg_info
creating thespian.egg-info
writing thespian.egg-info\PKG-INFO
writing dependency_links to thespian.egg-info\dependency_links.txt
writing top-level names to thespian.egg-info\top_level.txt
writing manifest file 'thespian.egg-info\SOURCES.txt'
reading manifest file 'thespian.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.txt' under directory 'contrib'
warning: no files found matching '*.txt' under directory 'examples'
writing manifest file 'thespian.egg-info\SOURCES.txt'
running build_ext
Traceback (most recent call last):
  File "setup.py", line 54, in <module>
    'fault tolerant']
  File "C:\Python36\lib\site-packages\setuptools\__init__.py", line 140, in setup
    return distutils.core.setup(**attrs)
  File "C:\Python36\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Python36\lib\distutils\dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "C:\Python36\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "C:\Python36\lib\site-packages\setuptools\command\test.py", line 228, in run
    self.run_tests()
  File "C:\Python36\lib\site-packages\setuptools\command\test.py", line 250, in run_tests
    exit=False,
  File "C:\Python36\lib\unittest\main.py", line 94, in __init__
    self.parseArgs(argv)
  File "C:\Python36\lib\unittest\main.py", line 118, in parseArgs
    self._do_discovery(argv[2:])
  File "C:\Python36\lib\unittest\main.py", line 229, in _do_discovery
    self.test = loader.discover(self.start, self.pattern, self.top)
  File "C:\Python36\lib\unittest\loader.py", line 341, in discover
    tests = list(self._find_tests(start_dir, pattern))
  File "C:\Python36\lib\unittest\loader.py", line 398, in _find_tests
    full_path, pattern, namespace)
  File "C:\Python36\lib\unittest\loader.py", line 475, in _find_test_path
    tests = self.loadTestsFromModule(package, pattern=pattern)
  File "C:\Python36\lib\site-packages\setuptools\command\test.py", line 54, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "C:\Python36\lib\unittest\loader.py", line 190, in loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "C:\Python36\lib\site-packages\setuptools\command\test.py", line 54, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "C:\Python36\lib\unittest\loader.py", line 153, in loadTestsFromName
    module = __import__(module_name)
  File "d:\roomored\thespian\thespian\system\dictconfig.py", line 28, in <module>
    class six:
  File "d:\roomored\thespian\thespian\system\dictconfig.py", line 29, in six
    string_types = basestring  # this module only used in Python2.
NameError: name 'basestring' is not defined
  • Running the multi_system examples:
ttimo_000@VANGUARD /c/d/R/T/e/m/act1> /cygdrive/c/Python36/python.exe start.py multiprocUDPBase
ttimo_000@VANGUARD /c/d/R/T/e/m/act1> echo "Hello, World!" | /cygdrive/c/Python36/python.exe app.py multiprocUDPBase
Traceback (most recent call last):
  File "app.py", line 57, in <module>
    asys = ActorSystem((sys.argv + ['multiprocTCPBase'])[1])
  File "C:\Python36\lib\site-packages\thespian\actors.py", line 638, in __init__
    systemBase, capabilities, logDefs)
  File "C:\Python36\lib\site-packages\thespian\actors.py", line 676, in _startupActorSys
    systemBase = sbc(self, logDefs=logDefs)
  File "C:\Python36\lib\site-packages\thespian\system\multiprocUDPBase.py", line 26, in __init__
    super(ActorSystemBase, self).__init__(system, logDefs)
  File "C:\Python36\lib\site-packages\thespian\system\multiprocCommon.py", line 85, in __init__
    super(multiprocessCommon, self).__init__(system, logDefs)
  File "C:\Python36\lib\site-packages\thespian\system\systemBase.py", line 329, in __init__
    logDefs)
  File "C:\Python36\lib\site-packages\thespian\system\multiprocCommon.py", line 114, in _startAdmin
    'not a valid ActorSystem admin')
thespian.actors.InvalidActorAddress: ActorAddr-(UDP|:1029) is not a valid ActorSystem admin

(same error happens with Python 2.7)

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
kquickcommented, Jan 14, 2019

Hi @TTimo ,

Thanks for the reports. Windows is supported and generally has the same functionality as the Unix versions, but I don’t have a Windows system available to test on, so sometimes Unix-isms creep in. In general, I know that within the last 2 years there was a lot of Windows use, so any issues should be within that timeframe.

Running the tests using Python’s unittest is not really supported: you should use pytest (https://docs.pytest.org) to run them, which will ensure the testing environment is setup correctly. Please let me know if the errors you are getting running the tests still occur when running via pytest and if so I’m definitely interested in resolving those issues.

With regards to the failure to run the Act1 example, one of the common problems on Windows is that it defaults to a rather aggressive firewall configuration which can block network activity even on the local machine. You might want to check your network settings to disable this. You can also check the C:\Windows\temp\ directory to see if thespian has left a logfile there; if so you could supply that via gist or email and I can see if it will help diagnose what is going wrong.

0reactions
kquickcommented, Mar 7, 2019

Thanks @TTimo. That’s a lot of good info. I’m setting up some local Windows access to research those issues you are still seeing, because it’s definitely not what I was expecting. I’ll keep you updated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

9 Most Common Windows 10 Problems and Their Solutions
9 Most Common Windows 10 Problems and Their Solutions ; #1. Stop too much data usage in the background ; #2. Minimize notifications...
Read more >
17 most common Windows 10 problems and how to fix them
1. Can't upgrade from Windows 7 or Windows 8 · 2. Can't upgrade to the latest Windows 10 version · 3. You have...
Read more >
100 common Windows 10 problems and how to solve them
1. Having enough space to install Windows 10 · 2. Checking you have a powerful enough PC · 3. Activating Windows 10 ·...
Read more >
Windows 10 Troubleshooting: The Most Common Problems ...
Windows 10 Troubleshooting: The Most Common Problems and How to Fix Them · Issues updating to the latest version of Windows 10 ·...
Read more >
Top 10 Most Common Windows 10/11 Problems and Their ...
1. Malfunctioning Bluetooth Feature · 2. Mouse Cursor Glides Across The Screen On Its Own · 3. Trouble With the Latest Update to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found