dask: distributed.protocol.core - CRITICAL - Failed to Serialize - dask

from dask.distributed import Client
client = Client()
...
df = dd.read_csv('*.csv')
versions:
dask 2.15.0 py_0
dask-core 2.15.0 py_0
geopandas 0.6.1 py_0
pandas 1.0.3 py37h47e9c7a_0
pandas-datareader 0.8.1 pypi_0
pyarrow 0.15.1 py37h47e9c7a_0
I noticed bug report #2597 on:
https://github.com/dask/distributed/issues/2597
it was closed on sep 2019, Was it resolved since then?

That problem seems to have been a user issue -- usecols must be list-like

Related

Error in importing ArraySliceDep from dask.layers

I got this error: ImportError: cannot import name 'ArraySliceDep' from 'dask.layers'
when I import stackstac. I have dask installed (2021.11.2 version) and my Python is 3.10 version

colab notebook in Chapter 3 of Underactuated Robotics is not working

The colab notebooks are not working even I used pip install:
!pip install drake
import importlib
import sys
from urllib.request import urlretrieve
# Install drake (and underactuated).
if 'google.colab' in sys.modules and importlib.util.find_spec('underactuated') is None:
urlretrieve(f"http://underactuated.csail.mit.edu/setup/setup_underactuated_colab.py",
"setup_underactuated_colab.py")
from setup_underactuated_colab import setup_underactuated
setup_underactuated(underactuated_sha='e089af19ca62590e131ad295b51d2c950a5ecc10', drake_version='0.27.0', drake_build='release')
server_args = []
if 'google.colab' in sys.modules:
server_args = ['--ngrok_http_tunnel']
# Start two meshcat server instances to use for the remainder of this notebook.
from meshcat.servers.zmqserver import start_zmq_server_as_subprocess
proc_planar, zmq_url_planar, web_url_planar = start_zmq_server_as_subprocess(server_args=server_args)
proc, zmq_url, web_url = start_zmq_server_as_subprocess(server_args=server_args)
import numpy as np
from ipywidgets import FloatSlider, ToggleButton
from IPython.display import display, SVG
import pydot
import pydrake.all
from pydrake.all import (
DiagramBuilder, LinearQuadraticRegulator, Saturation, SceneGraph, Simulator,
WrapToSystem, AddMultibodyPlantSceneGraph, Parser
)
from pydrake.examples.acrobot import AcrobotPlant, AcrobotGeometry
from pydrake.systems.jupyter_widgets import WidgetSystem
from pydrake.common.containers import namedview
from underactuated import FindResource
from underactuated.jupyter import running_as_notebook
The drake version 0.27.0 that you've specified will be ignored. We've switched to a `pip install` workflow for colab, and are transitioning to that.
Cloning into '/opt/underactuated'...
HEAD is now at e089af1 setup colab uses pip install drake
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
torchvision 0.11.1+cu111 requires torch==1.10.0, but you have torch 1.8.1 which is incompatible.
torchtext 0.11.0 requires torch==1.10.0, but you have torch 1.8.1 which is incompatible.
torchaudio 0.10.0+cu111 requires torch==1.10.0, but you have torch 1.8.1 which is incompatible.
albumentations 0.1.12 requires imgaug<0.2.7,>=0.2.5, but you have imgaug 0.2.9 which is incompatible.
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/x/xorg-server/xvfb_1.19.6-1ubuntu4.9_amd64.deb 404 Not Found [IP: 91.189.88.142 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
<ipython-input-3-7cd256303862> in <module>()
8 "setup_underactuated_colab.py")
9 from setup_underactuated_colab import setup_underactuated
---> 10 setup_underactuated(underactuated_sha='e089af19ca62590e131ad295b51d2c950a5ecc10', drake_version='0.27.0', drake_build='release')
11
12 server_args = []
1 frames
/content/setup_underactuated_colab.py in run(cmd, **kwargs)
94 if cp.stderr:
95 print(cp.stderr)
---> 96 assert cp.returncode == 0, cp
97
98 # Clone the repo (if necessary).
AssertionError: CompletedProcess(args=['apt', 'install', 'xvfb'], returncode=100, stdout='Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following NEW packages will be installed:\n xvfb\n0 upgraded, 1 newly installed, 0 to remove and 37 not upgraded.\nNeed to get 784 kB of archives.\nAfter this operation, 2,270 kB of additional disk space will be used.\nIgn:1 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 xvfb amd64 2:1.19.6-1ubuntu4.9\nErr:1 http://security.ubuntu.com/ubuntu bionic-updates/universe amd64 xvfb amd64 2:1.19.6-1ubuntu4.9\n 404 Not Found [IP: 91.189.88.142 80]\n', stderr='\nWARNING: apt does not have a stable CLI interface. Use with caution in scripts.\n\nE: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/x/xorg-server/xvfb_1.19.6-1ubuntu4.9_amd64.deb 404 Not Found [IP: 91.189.88.142 80]\nE: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?\n')
Good news. As of this morning, you no longer have to use the setup_underactuated, and can install with pip, e.g. via
!pip install underactuated==2022.01.03
at the top of the notebook.
Unforunately, ngrok seems to have changed their support for unregistered connections, so you might still have to overcome this:
https://github.com/RussTedrake/underactuated/issues/454

Not a compile-time constant. | const _AlwaysThrows alwaysThrows = _AlwaysThrows();

I've inherited a Dart project that has been dormant for about 3 years. When trying to compile the project I get an error from the meta package. I am unsure how to resolve it.
The error is:
[Error from Dart2JS on askbayoucom|web/main.dart]:
web\packages\meta\meta.dart:50:36:
Not a compile-time constant.
const _AlwaysThrows alwaysThrows = _AlwaysThrows();
^^^^^^^^^^^^^^^
I'm using SDK 1.24.3 which I believe is the most recent allowable due to this entry in pubspec.yaml
environment:
sdk: '>=1.0.0 <2.0.0'
When running pub upgrade I get the output:
Resolving dependencies...
args 1.5.1 (1.6.0 available)
async 1.13.3 (2.4.2 available)
barback 0.15.2+15 (0.15.2+16 available)
browser 0.10.0+3
charcode 1.1.2 (1.1.3 available)
collection 1.14.6 (1.14.13 available)
csslib 0.14.3 (0.16.2 available)
dart_config 0.5.0
dart_to_js_script_rewriter 1.0.3
html 0.13.3 (0.14.0+3 available)
js 0.6.1+1 (0.6.2 available)
logging 0.11.3+2 (0.11.4 available)
meta 1.2.2 (1.3.0-nullsafety.2 available)
path 1.5.1 (1.7.0 available)
pool 1.3.4 (1.4.0 available)
source_span 1.5.5 (1.7.0 available)
stack_trace 1.9.3 (1.9.5 available)
string_scanner 1.0.4 (1.0.5 available)
term_glyph 1.1.0 (1.2.0-nullsafety available)
unittest 0.11.7 (0.12.4+1 available)
utf 0.9.0+3 (0.9.0+5 available)
yaml 2.1.13 (2.2.1 available)
No dependencies changed.
That's a bug in the SDK requirements of package meta.
The const _AlwaysThrows alwaysThrows = _AlwaysThrows(); requires a v2.0.0 or later SDK, but the SDK requirement for that meta package incorrectly claims that it works for earlier SDK versions.
See https://github.com/dart-lang/sdk/issues/42935

dart pub get fails to resolve dependencies

Version: 1.30.0 (system setup)
Commit: c6e592b2b5770e40a98cb9c2715a8ef89aec3d74
Date: 2018-12-11T22:29:11.253Z
Electron: 2.0.12
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
OS: Windows_NT x64 6.1.7601
Dart VM version: 2.1.0-dev.9.4.flutter-f9ebf21297
(Thu Nov 8 23:00:07 2018 +0100) on "windows_x64"
[Dart_Reformatter] pub get
Resolving dependencies...
The current Dart SDK version is 2.1.0-dev.9.4.flutter-f9ebf21297.
Because Dart_Reformatter depends on stagehand >=3.1.4 which requires SDK version >=2.1.0 <3.0.0, version solving failed.
exit code 1
I'm not sure what I need to do to fix this.
You need to install a version of Dart (or Flutter) where the Dart SDK is >=2.1.0 – in semver, 2.1.0-dev... is < 2.1.0.
Try flutter upgrade?

ImportError: dlopen: cannot load any more object with static TLS

I'm getting an ImportError if OpenCV (cv2) is imported after the tensorflow exporter.
ubuntu#ip-172-31-2-144:~/Downloads/opencv-2.4.13/release$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from tensorflow.contrib.session_bundle import exporter
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcurand.so locally
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen: cannot load any more object with static TLS
>>>
However, it works just fine the other way around:
ubuntu#ip-172-31-2-144:~/Downloads/opencv-2.4.13/release$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> from tensorflow.contrib.session_bundle import exporter
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcurand.so locally
>>>
Any idea what's going on?
I had the same error as you and I've just fixed it executing import opencv2 a second time. It's a workaround.. but I can continue working, so..
I had same issue but solved.
When I import cv2 on jupyter notebook, same error was displayed, but after that, I imported cv2 on terminal (python) then it worked.
And finally, cv2 can be imported on jupyter notebook.
Please try that.

Resources