Skip to content

Can't run examplehuman #374

@ErinWeisbart

Description

@ErinWeisbart
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).

---------------------------------------------------------------------------
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions