I've installed the python module pyvirtualdisplay from https://pypi.python.org/pypi/PyVirtualDisplay
It says it should work on python version 3.3
I then execute the code in python 3.3:
from pyvirtualdisplay import Display
myDisplay = Display(visible=0, size=(800, 600))
This produces the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "./display.py", line 37, in __init__
**kwargs)
File "/home/thesaleb/python33/lib/python3.3/site- packages/pyvirtualdisplay/xvfb.py", line 33, in __init__
AbstractDisplay.__init__(self)
File "/home/thesaleb/python33/lib/python3.3/site-packages/pyvirtualdisplay/abstractdisplay.py", line 25, in __init__
self.display = self.search_for_display()
File "/home/thesaleb/python33/lib/python3.3/site-packages/pyvirtualdisplay/abstractdisplay.py", line 50, in search_for_display
if len(ls):
TypeError: object of type 'map' has no len()
From what I've looked up it seems other people have had this TypeError when trying to execute python 2 code in python 3 environments. Indeed, I installed everything on a python 2 environment and all the code works fine.
So, am I missing something, should this code work in python 3.3 or did they lie when they said it was compatible? Also this was all done on a linux machine and I'm a linux newbie so I could've messed up some python installation or something. Anybody have any ideas?
Thanks