cytomining / cytomining/CytoTable

Can't run examplehuman

Open
#374 7 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Python
Stars
21
Forks
6
Avg merge
2d 3h
Merged PRs (30d)
6

Description

```python
import pathlib
from collections import Counter

import pandas as pd
import pyarrow.parquet as pq
from IPython.display import Image, display
from PIL import Image

import cytotable

# setup variables for use throughout the notebook
source_path = "/Users/eweisbar/Desktop/github/CytoTable/tests/data/cellprofiler/examplehuman"
dest_path = "/Users/eweisbar/Desktop/example.parquet"

list(pathlib.Path(source_path).glob("*"))

result = cytotable.convert(
source_path=source_path,
dest_path=dest_path,
# specify a destination data format type
dest_datatype="parquet",
# specify a preset which enables quick use of common input file formats
preset="cellprofiler_csv",
)
print(pathlib.Path(result).name)

pq.read_table(source=result).to_pandas().head()
```

I created a new Python 3.11 conda environment.
I ran `pip install cytotable` and `pip install ipykernel` so I could run it from a Jupyter notebook.

On first execution I got `ModuleNotFoundError: No module named 'PIL'` so I `pip install Pillow`.

Now I'm getting `ConnectionError: No viable ZMQ url from: tcp://73.42.154.156:54345, tcp://192.168.68.54:54345` whether I run it in Python or in my Jupyter notebook (though the tcp numbers vary).

```text
---------------------------------------------------------------------------
BadStateException Traceback (most recent call last)
Cell In[2], [line 17](vscode-notebook-cell:?execution_count=2&line=17)
13 dest_path = "/Users/eweisbar/Desktop/example.parquet"
15 list(pathlib.Path(source_path).glob("*"))
---> [17](vscode-notebook-cell:?execution_count=2&line=17) result = cytotable.convert(
18 source_path=source_path,
19 dest_path=dest_path,
20 # specify a destination data format type
21 dest_datatype="parquet",
22 # specify a preset which enables quick use of common input file formats
23 preset="cellprofiler_csv",
24 )
25 print(pathlib.Path(result).name)
27 pq.read_table(source=result).to_pandas().head()

File ~/miniforge3/envs/cytotable/lib/python3.11/site-packages/cytotable/convert.py:1714, in convert(source_path, dest_path, dest_datatype, source_datatype, metadata, compartments, identifying_columns, concat, join, joins, chunk_size, infer_common_schema, drop_null, data_type_cast_map, add_tablenumber, page_keys, sort_output, preset, parsl_config, **kwargs)
1703 raise CytoTableException(
1704 (
1705 "When using join=True one must pass a 'join' pagination key "
(...) 1710 )
1711 )
1713 # send sources to be written to parquet if selected
-> [1714](https://file+.vscode-resource.vscode-cdn.net/Users/eweisbar/Desktop/github/CellProfiler-plugins/~/miniforge3/envs/cytotable/lib/python3.11/site-packages/cytotable/convert.py:1714) output = _run_export_workflow(
1715 source_path=source_path,
...
File "/Users/eweisbar/miniforge3/envs/cytotable/lib/python3.11/site-packages/parsl/executors/high_throughput/probe.py", line 67, in probe_addresses
raise ConnectionError(f"No viable ZMQ url from: {addys}")
ConnectionError: No viable ZMQ url from: tcp://73.42.154.156:54345, tcp://192.168.68.54:54345
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the notebook snippet with the examplehuman path and inspect cytotable/convert.py around line 1714, where the export workflow is invoked. Trace the Parsl high-throughput configuration associated with the reported probe_addresses failure; done means the conversion completes and the resulting Parquet file can be read.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, pandas, python
Domain
data-engineering, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.