Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Traceback (most recent call last):
- File "/opt/Python-3.6.0/lib/python3.6/tkinter/__init__.py", line 3501, in __del__
- self.tk.call('image', 'delete', self.name)
- RuntimeError: main thread is not in main loop
- from time import sleep
- import numpy as np
- import matplotlib.pyplot as plt
- from dask.distributed import Client, LocalCluster
- if __name__ == '__main__':
- cluster = LocalCluster(
- n_workers=2,
- processes=True,
- threads_per_worker=1
- )
- client = Client(cluster)
- x = np.linspace(0, 1, 100)
- y = x * x
- plt.plot(x, y)
- print('Computation complete! Stopping workers...')
- client.close()
- sleep(1)
- cluster.close()
- print('Execution complete!')
- tornado.application - ERROR - Exception in Future <Future cancelled> after timeout
Add Comment
Please, Sign In to add comment