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

[BUG]AttributeError: 'NoneType' object has no attribute 'scatter' #176

Closed
brianpenghe opened this issue May 29, 2020 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@brianpenghe
Copy link

I was running this command:

%%time
adjacencies = grnboost2(ex_matrix, tf_names=tf_names,verbose=True,client_or_address=custom_client)

And then I got this error:
preparing dask client
parsing input
creating dask graph
not shutting down client, client was created externally
finished
/usr/local/lib/python3.6/dist-packages/arboreto/algo.py:214: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead.
expression_matrix = expression_data.as_matrix()

AttributeError Traceback (most recent call last)
in

/usr/local/lib/python3.6/dist-packages/arboreto/algo.py in grnboost2(expression_data, gene_names, tf_names, client_or_address, early_stop_window_length, limit, seed, verbose)
39 return diy(expression_data=expression_data, regressor_type='GBM', regressor_kwargs=SGBM_KWARGS,
40 gene_names=gene_names, tf_names=tf_names, client_or_address=client_or_address,
---> 41 early_stop_window_length=early_stop_window_length, limit=limit, seed=seed, verbose=verbose)
42
43

/usr/local/lib/python3.6/dist-packages/arboreto/algo.py in diy(expression_data, regressor_type, regressor_kwargs, gene_names, tf_names, client_or_address, early_stop_window_length, limit, seed, verbose)
126 early_stop_window_length=early_stop_window_length,
127 limit=limit,
--> 128 seed=seed)
129
130 if verbose:

/usr/local/lib/python3.6/dist-packages/arboreto/core.py in create_graph(expression_matrix, gene_names, tf_names, regressor_type, regressor_kwargs, client, target_genes, limit, include_meta, early_stop_window_length, repartition_multiplier, seed)
401 tf_matrix, tf_matrix_gene_names = to_tf_matrix(expression_matrix, gene_names, tf_names)
402
--> 403 future_tf_matrix = client.scatter(tf_matrix, broadcast=True)
404 # [1] wrap in a list of 1 -> unsure why but Matt. Rocklin does this often...
405 [future_tf_matrix_gene_names] = client.scatter([tf_matrix_gene_names], broadcast=True)

/usr/local/lib/python3.6/dist-packages/distributed/client.py in scatter(self, data, workers, broadcast, direct, hash, maxsize, timeout, asynchronous)
1873 broadcast=broadcast, direct=direct,
1874 local_worker=local_worker, timeout=timeout,
-> 1875 asynchronous=asynchronous, hash=hash)
1876
1877 @gen.coroutine

/usr/local/lib/python3.6/dist-packages/distributed/client.py in sync(self, func, *args, **kwargs)
674 return future
675 else:
--> 676 return sync(self.loop, func, *args, **kwargs)
677
678 def repr(self):

/usr/local/lib/python3.6/dist-packages/distributed/utils.py in sync(loop, func, *args, **kwargs)
280 e.wait(10)
281 if error[0]:
--> 282 six.reraise(*error[0])
283 else:
284 return result[0]

~/.local/lib/python3.6/site-packages/six.py in reraise(tp, value, tb)
701 if value.traceback is not tb:
702 raise value.with_traceback(tb)
--> 703 raise value
704 finally:
705 value = None

/usr/local/lib/python3.6/dist-packages/distributed/utils.py in f()
265 if timeout is not None:
266 future = gen.with_timeout(timedelta(seconds=timeout), future)
--> 267 result[0] = yield future
268 except Exception as exc:
269 error[0] = sys.exc_info()

/usr/local/lib/python3.6/dist-packages/tornado/gen.py in run(self)
727
728 try:
--> 729 value = future.result()
730 except Exception:
731 exc_info = sys.exc_info()

/usr/local/lib/python3.6/dist-packages/tornado/gen.py in wrapper(*args, **kwargs)
207 # performance penalty for the synchronous case.
208 try:
--> 209 yielded = next(result)
210 except (StopIteration, Return) as e:
211 future_set_result_unless_cancelled(

/usr/local/lib/python3.6/dist-packages/distributed/client.py in _scatter(self, data, workers, broadcast, direct, local_worker, timeout, hash)
1732 client=self.id)
1733 else:
-> 1734 yield self.scheduler.scatter(data=data2, workers=workers,
1735 client=self.id,
1736 broadcast=broadcast,

AttributeError: 'NoneType' object has no attribute 'scatter'

I was using desk 1.0.0 and pandas 0.23.4

Any thoughts?

@brianpenghe brianpenghe added the bug Something isn't working label May 29, 2020
@cflerin
Copy link
Contributor

cflerin commented Jun 1, 2020

Please take a look at #163 and see if any of the suggestions there help to solve your problem.

@cflerin
Copy link
Contributor

cflerin commented Feb 18, 2021

Please try with pySCENIC 0.11.0 to see if this resolves the issue.

@cflerin cflerin closed this as completed Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants