OniOni / python-parallel-wd

Run selenium tests in multiple browsers with minimum hastle. Python flavor !
34 stars 13 forks source link

Crashes on Windows #7

Open Themanwithoutaplan opened 11 years ago

Themanwithoutaplan commented 11 years ago

There seems to be a problem with the way multiprocessingis being used. Haven't pasted the whole traceback just what seems to be the key part. ...

self = <multiprocessing.forking.ForkingPickler instance at 0x0000000002C29BC8> obj = <function thread_func at 0x0000000002B8C898>, name = 'thread_func' pack =

def save_global(self, obj, name=None, pack=struct.pack):
    write = self.write
    memo = self.memo

    if name is None:
        name = obj.__name__

    module = getattr(obj, "__module__", None)
    if module is None:
        module = whichmodule(obj, name)

    try:
        __import__(module)
        mod = sys.modules[module]
        klass = getattr(mod, name)
    except (ImportError, KeyError, AttributeError):
        raise PicklingError(
            "Can't pickle %r: it's not found as %s.%s" %
          (obj, module, name))

E PicklingError: Can't pickle <function thread_func at 0x0000000002B8C 898>: it's not found as wd.parallel.thread_func

C:\Python27\Lib\pickle.py:748: PicklingError

...