Yelab2020 / Cottrazm

Construct Tumor Transition Zone Microenvironment
35 stars 7 forks source link

Error when using STModiCluster #10

Open jestlin15 opened 7 months ago

jestlin15 commented 7 months ago

Hihi can I please get help for this error?

When I run this code I get the error below.

TumorST <- STModiCluster(InDir = InDir, Sample = Sample, OutDir = OutDir, TumorST = TumorST, res = 1.5)
P1T start SME normalize

Error in py_call_impl(callable, call_args$unnamed, call_args$named) : TypeError: decoding str is not supported Run reticulate::py_last_error() for details.

reticulate::py_last_error()

── Python Exception Message ───────────────────────────────────────────────── Traceback (most recent call last): File "/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Cottrazm/python/Rusedtile.py", line 21, in ME_normalize data=st.Read10X(path = inDir) File "/Users/jes/anaconda3/envs/TumorBoundary/lib/python3.8/site-packages/stlearn/wrapper/read.py", line 96, in Read10X library_id_raw = attrs.pop("library_ids")[0] TypeError: decoding str is not supported

── R Traceback ────────────────────────────────────────────────────────────── ▆

  1. └─Cottrazm::STModiCluster(...)
  2. └─reticulate (local) ME_normalize(inDir = InDir, outDir = OutDir, sample = Sample)
  3. └─reticulate:::py_call_impl(callable, call_args$unnamed, call_args$named)

    My stlearn version is 0.4.12

ShengFang-0829 commented 7 months ago

Specific error details need to be checked. Perhaps there is an issue with this package keras. raise Exception(error_msg.format(origin, e.errno, e.reason)) Exception: URL fetch failure on https://storage.googleapis.com/tensorflow/keras-applications/resnet/resnet50_weights_tf_dim_ordering_tf_kernels_notop.h5: None -- [Errno 104] Connection reset by peer Solution: You can download the H5 data file locally in advance(Linux:$HOME/.keras/models,Windows:python package file settings/.keras/models/).

xzz-1995 commented 5 months ago

This problem might arise from Stlearn Read10X funcion, when I checked the current vision (1.0.1) the code in '.../stlearn/wrapper/read.py' changed to: library_id = str(attrs.pop("library_ids")[0], "utf-8"). So, I think you might need to update your Stlearn version, then the TypeError about str might be solved.

daswind commented 4 months ago

I have the same question. Do you konw which one is the right type for avoid package conflicts? Thank you.

ConDem94 commented 2 weeks ago

Hihi can I please get help for this error?

When I run this code I get the error below.


TumorST <- STModiCluster(InDir = InDir, Sample = Sample, OutDir = OutDir, TumorST = TumorST, res = 1.5)

P1T start SME normalize

Error in py_call_impl(callable, call_args$unnamed, call_args$named) :

TypeError: decoding str is not supported

Run reticulate::py_last_error() for details.

reticulate::py_last_error()

── Python Exception Message ─────────────────────────────────────────────────

Traceback (most recent call last):

File "/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Cottrazm/python/Rusedtile.py", line 21, in ME_normalize

data=st.Read10X(path = inDir)

File "/Users/jes/anaconda3/envs/TumorBoundary/lib/python3.8/site-packages/stlearn/wrapper/read.py", line 96, in Read10X

library_id_raw = attrs.pop("library_ids")[0]

TypeError: decoding str is not supported

── R Traceback ──────────────────────────────────────────────────────────────

  1. └─Cottrazm::STModiCluster(...)

  2. └─reticulate (local) ME_normalize(inDir = InDir, outDir = OutDir, sample = Sample)

  3. └─reticulate:::py_call_impl(callable, call_args$unnamed, call_args$named)

    My stlearn version is 0.4.12

Hi, did you find a solution to this? I'm encountering the same issue.