Auto Segmentation error in 'brats_segmentation_v0.3.3' model

Describe the bug
[2022-11-22 10:24:37,281] [19036] [MainThread] [ERROR] (uvicorn.error:119) - Traceback (most recent call last):
File "C:\Users\AA\AppData\Local\Programs\Python\Python39\lib\site-packages\starlette\routing.py", line 635, in lifespan
async with self.lifespan_context(app):
File "C:\Users\AA\AppData\Local\Programs\Python\Python39\lib\site-packages\starlette\routing.py", line 530, in aenter
await self.router.startup()
File "C:\Users\AA\AppData\Local\Programs\Python\Python39\lib\site-packages\starlette\routing.py", line 612, in startup
await handler()
File "C:\Users\AA\AppData\Local\Programs\Python\Python39\lib\site-packages\monailabel\app.py", line 106, in startup_event
instance = app_instance()
File "C:\Users\AA\AppData\Local\Programs\Python\Python39\lib\site-packages\monailabel\interfaces\utils\app.py", line 51, in app_instance
app = c(app_dir=app_dir, studies=studies, conf=conf)
File "C:\Users\AA\apps\monaibundle\main.py", line 90, in init
super().init(
File "C:\Users\AA\AppData\Local\Programs\Python\Python39\lib\site-packages\monailabel\interfaces\app.py", line 96, in init
self.trainers = self.init_trainers() if settings.MONAI_LABEL_TASKS_TRAIN else {}
File "C:\Users\AA\apps\monaibundle\main.py", line 116, in init_trainers
t = BundleTrainTask(b, self.conf)
File "C:\Users\AA\AppData\Local\Programs\Python\Python39\lib\site-packages\monailabel\tasks\train\bundle.py", line 83, in init
self.bundle_config.read_config(self.bundle_config_path)
File "C:\Users\AA\AppData\Local\Programs\Python\Python39\lib\site-packages\monai\bundle\config_parser.py", line 300, in read_config
content.update(self.load_config_files(f, **kwargs))
File "C:\Users\AA\AppData\Local\Programs\Python\Python39\lib\site-packages\monai\bundle\config_parser.py", line 403, in load_config_files
for k, v in (cls.load_config_file(i, **kwargs)).items():
File "C:\Users\AA\AppData\Local\Programs\Python\Python39\lib\site-packages\monai\bundle\config_parser.py", line 382, in load_config_file
return json.load(f, **kwargs)
File "C:\Users\AA\AppData\Local\Programs\Python\Python39\lib\json_init.py", line 293, in load
return loads(fp.read(),
File "C:\Users\AA\AppData\Local\Programs\Python\Python39\lib\json_init.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\AA\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\AA\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 63 column 43 (char 1947)
[2022-11-22 10:24:37,282] [19036] [MainThread] [ERROR] (uvicorn.error:56) - Application startup failed. Exiting.
To Reproduce
Steps to reproduce the behavior:

'in_channel' value edited 4 into 1  and added 'ensure_channel_first": ture in inference.json

edited inference.json code
"target": "SegResNet",
"blocks_down": [
1,
2,
2,
4
],
"blocks_up": [
1,
1,
1
],
"init_filters": 16,
"in_channels": 1,
"out_channels": 3,
"dropout_prob": 0.2
},
"network": "$@network_def.to(@device)",
"preprocessing": {
"target": "Compose",
"transforms": [
{
"target": "LoadImaged",
"keys": "image",
"ensure_channel_first": true
},

'in_channel' value edited 4 into 1 and added 'ensure_channel_first": ture in train.json

edited train.json code
"target": "SegResNet",
"blocks_down": [
1,
2,
2,
4
],
"blocks_up": [
1,
1,
1
],
"init_filters": 16,
"in_channels": 1,
"out_channels": 3,
"dropout_prob": 0.2
},
.
.
.
"train": {
"preprocessing_transforms": [
{
"target": "LoadImaged",
"keys": [
"image",
"label",
"ensure_channel_first": true
]
},

'("inputs" :) num_channel' value edits 4 into 1 train.json

edited metadata.json code
"intended_use": "This is an example, not to be used for diagnostic purposes",
"references": [
"Myronenko, Andriy. '3D MRI brain tumor segmentation using autoencoder regularization.' International MICCAI Brainlesion Workshop. Springer, Cham, 2018. https://arxiv.org/abs/1810.11654"
],
"network_data_format": {
"inputs": {
"image": {
"type": "image",
"format": "magnitude",
"modality": "MR",
"num_channels": 1,
"spatial_shape": [
"8n",
"8n",
"8*n"
],

Expected behavior
I can expect result when I press 'run' button in Auto Segmentation option, after I edited and added inference.json, train.josn and metadata.json.

Screenshots
But I can't extract brain tumor as following figure.

Environment
Printing MONAI config...
MONAI version: 1.0.1
Numpy version: 1.23.4
Pytorch version: 1.12.1+cu113
MONAI flags: HAS_EXT = False, USE_COMPILED = False, USE_META_DICT = False
MONAI rev id: 8271a193229fe4437026185e218d5b06f7c8ce69
MONAI file: C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\site-packages\monai_init_.py
Optional dependencies:
Pytorch Ignite version: 0.4.10
Nibabel version: 4.0.2
scikit-image version: 0.19.3
Pillow version: 9.3.0
Tensorboard version: 2.10.1
gdown version: 4.5.3
TorchVision version: 0.13.1+cu113
tqdm version: 4.64.1
lmdb version: 1.3.0
psutil version: 5.9.4
pandas version: 1.5.1
einops version: 0.6.0
transformers version: 4.24.0
mlflow version: 2.0.1
pynrrd version: 0.4.3
For details about installing the optional dependencies, please visit:
https://docs.monai.io/en/latest/installation.html#installing-the-recommended-dependencies
================================
Printing system config...
System: Windows
Win32 version: ('10', '10.0.22000', 'SP0', 'Multiprocessor Free')
Win32 edition: Core
Platform: Windows-10-10.0.22000-SP0
Processor: AMD64 Family 25 Model 80 Stepping 0, AuthenticAMD
Machine: AMD64
Python version: 3.9.13
Process name: python.exe
Command: ['C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\python.exe', '-c', 'import monai; monai.config.print_debug_info()']
Open files: [popenfile(path='C:\Program Files\WindowsApps\Microsoft.LanguageExperiencePackko-KR_22<IP_ADDRESS>_neutral__8wekyb3d8bbwe\Windows\System32\ko-KR\39386f74d1967f5c37a5b4171f81c8f3\kernel32.dll.mui', fd=-1), popenfile(path='C:\Program Files\WindowsApps\Microsoft.LanguageExperiencePackko-KR_22<IP_ADDRESS>_neutral__8wekyb3d8bbwe\Windows\System32\ko-KR\fe441ef3ed396a241e46f9f354057863\tzres.dll.mui', fd=-1), popenfile(path='C:\Program Files\WindowsApps\Microsoft.LanguageExperiencePackko-KR_22<IP_ADDRESS>_neutral__8wekyb3d8bbwe\Windows\System32\ko-KR\a7c1941e6709c10ab525083b61805316\KernelBase.dll.mui', fd=-1)]
Num physical CPUs: 8
Num logical CPUs: 16
Num usable CPUs: 16
CPU usage (%): [10.3, 9.4, 6.9, 3.8, 4.4, 0.6, 1.9, 2.2, 6.6, 15.2, 7.8, 3.2, 2.2, 0.9, 6.0, 41.1]
CPU freq. (MHz): 3301
Load avg. in last 1, 5, 15 mins (%): [0.0, 0.0, 0.0]
Disk usage (%): 60.3
Avg. sensor temp. (Celsius): UNKNOWN for given OS
Total physical memory (GB): 15.4
Available memory (GB): 7.1
Used memory (GB): 8.3
================================
Printing GPU config...
Num GPUs: 1
Has CUDA: True
CUDA version: 11.3
cuDNN enabled: True
cuDNN version: 8302
Current device: 0
Library compiled for CUDA architectures: ['sm_37', 'sm_50', 'sm_60', 'sm_61', 'sm_70', 'sm_75', 'sm_80', 'sm_86', 'compute_37']
GPU 0 Name: NVIDIA GeForce RTX 3070 Laptop GPU
GPU 0 Is integrated: False
GPU 0 Is multi GPU board: False
GPU 0 Multi processor count: 40
GPU 0 Total memory (GB): 8.0
GPU 0 CUDA capability (maj.min): 8.6

Hello, @yiheng-wang-nv
Thank you for answering my question

There is no problem regarding 63 line in decorder.py that error showed.
Is it correct to modify it as follows??
In inference.json code
"in_channels": 1 ---->edit
"ensure_channel_first: true" ------------->add
In train.json code
In inference.json code
"in_channels": 1 ---->edit
"ensure_channel_first: true" ------------->add
In metadata.json
"num_channels": 1 ------>edit

Hi @ulphypro , I suspect here "line 63" is for the json file that produced the error, not for decoder.py. I cannot find an error in the code you attached, but may need to see the whole json files to double check it.

Edited inference.json code included in brats_mri_segmentation_v0.3.3
{
"imports": [
"$import glob",
"$import os"
],
"bundle_root": "/workspace/brats_mri_segmentation",
"ckpt_dir": "$@bundle_root + '/models'",
"output_dir": "$@bundle_root + '/eval'",
"data_list_file_path": "$@bundle_root + '/configs/datalist.json'",
"data_file_base_dir": "/workspace/data/medical/brats2018challenge",
"test_datalist": "$monai.data.load_decathlon_datalist(@data_list_file_path, data_list_key='testing', base_dir=@data_file_base_dir)",
"device": "$torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')",
"amp": true,
"network_def": {
"target": "SegResNet",
"blocks_down": [
1,
2,
2,
4
],
"blocks_up": [
1,
1,
1
],
"init_filters": 16,
"in_channels": 1,
"out_channels": 3,
"dropout_prob": 0.2
},
"network": "$@network_def.to(@device)",
"preprocessing": {
"target": "Compose",
"transforms": [
{
"target": "LoadImaged",
"keys": "image",
"ensure_channel_first": true
},
{
"target": "NormalizeIntensityd",
"keys": "image",
"nonzero": true,
"channel_wise": true
}
]
},
"dataset": {
"target": "Dataset",
"data": "@test_datalist",
"transform": "@preprocessing"
},
"dataloader": {
"target": "DataLoader",
"dataset": "@dataset",
"batch_size": 1,
"shuffle": true,
"num_workers": 4
},
"inferer": {
"target": "SlidingWindowInferer",
"roi_size": [
240,
240,
160
],
"sw_batch_size": 1,
"overlap": 0.5
},
"postprocessing": {
"target": "Compose",
"transforms": [
{
"target": "Activationsd",
"keys": "pred",
"sigmoid": true
},
{
"target": "Invertd",
"keys": "pred",
"transform": "@preprocessing",
"orig_keys": "image",
"meta_keys": "pred_meta_dict",
"nearest_interp": false,
"to_tensor": true
},
{
"target": "AsDiscreted",
"keys": "pred",
"threshold": 0.5
},
{
"target": "SaveImaged",
"keys": "pred",
"meta_keys": "pred_meta_dict",
"output_dir": "@output_dir"
}
]
},
"handlers": [
{
"target": "CheckpointLoader",
"load_path": "$@bundle_root + '/models/model.pt'",
"load_dict": {
"model": "@network"
}
},
{
"target": "StatsHandler",
"iteration_log": false
}
],
"evaluator": {
"target": "SupervisedEvaluator",
"device": "@device",
"val_data_loader": "@dataloader",
"network": "@network",
"inferer": "@inferer",
"postprocessing": "@postprocessing",
"val_handlers": "@handlers",
"amp": true
},
"evaluating": [
"$setattr(torch.backends.cudnn, 'benchmark', True)",
"$@evaluator.run()"
]
}

Edited train.json code included in brats_mri_segmentation_v0.3.3
{
"imports": [
"$import glob",
"$import os"
],
"bundle_root": "/workspace/brats_mri_segmentation",
"ckpt_dir": "$@bundle_root + '/models'",
"output_dir": "$@bundle_root + '/eval'",
"data_list_file_path": "$@bundle_root + '/configs/datalist.json'",
"data_file_base_dir": "/workspace/data/medical/brats2018challenge",
"train_datalist": "$monai.data.load_decathlon_datalist(@data_list_file_path, data_list_key='training', base_dir=@data_file_base_dir)",
"val_datalist": "$monai.data.load_decathlon_datalist(@data_list_file_path, data_list_key='validation', base_dir=@data_file_base_dir)",
"device": "$torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')",
"epochs": 300,
"val_interval": 1,
"learning_rate": 0.0001,
"amp": true,
"network_def": {
"target": "SegResNet",
"blocks_down": [
1,
2,
2,
4
],
"blocks_up": [
1,
1,
1
],
"init_filters": 16,
"in_channels": 1,
"out_channels": 3,
"dropout_prob": 0.2
},
"network": "$@network_def.to(@device)",
"loss": {
"target": "DiceLoss",
"smooth_nr": 0,
"smooth_dr": 1e-05,
"squared_pred": true,
"to_onehot_y": false,
"sigmoid": true
},
"optimizer": {
"target": "torch.optim.Adam",
"params": "$@network.parameters()",
"lr": "@learning_rate",
"weight_decay": 1e-05
},
"lr_scheduler": {
"target": "torch.optim.lr_scheduler.CosineAnnealingLR",
"optimizer": "@optimizer",
"T_max": "@epochs"
},
"train": {
"preprocessing_transforms": [
{
"target": "LoadImaged",
"keys": [
"image",
"label",
"ensure_channel_first": true
]
},
{
"target": "ConvertToMultiChannelBasedOnBratsClassesd",
"keys": "label"
},
{
"target": "NormalizeIntensityd",
"keys": "image",
"nonzero": true,
"channel_wise": true
}
],
"random_transforms": [
{
"target": "RandSpatialCropd",
"keys": [
"image",
"label"
],
"roi_size": [
224,
224,
144
],
"random_size": false
},
{
"target": "RandFlipd",
"keys": [
"image",
"label"
],
"prob": 0.5,
"spatial_axis": 0
},
{
"target": "RandFlipd",
"keys": [
"image",
"label"
],
"prob": 0.5,
"spatial_axis": 1
},
{
"target": "RandFlipd",
"keys": [
"image",
"label"
],
"prob": 0.5,
"spatial_axis": 2
},
{
"target": "RandScaleIntensityd",
"keys": "image",
"factors": 0.1,
"prob": 1.0
},
{
"target": "RandShiftIntensityd",
"keys": "image",
"offsets": 0.1,
"prob": 1.0
}
],
"preprocessing": {
"target": "Compose",
"transforms": "$@train#preprocessing_transforms + @train#random_transforms"
},
"dataset": {
"target": "Dataset",
"data": "@train_datalist",
"transform": "@train#preprocessing"
},
"dataloader": {
"target": "DataLoader",
"dataset": "@train#dataset",
"batch_size": 1,
"shuffle": true,
"num_workers": 4
},
"inferer": {
"target": "SimpleInferer"
},
"postprocessing": {
"target": "Compose",
"transforms": [
{
"target": "Activationsd",
"keys": "pred",
"sigmoid": true
},
{
"target": "AsDiscreted",
"keys": "pred",
"threshold": 0.5
}
]
},
"handlers": [
{
"target": "LrScheduleHandler",
"lr_scheduler": "@lr_scheduler",
"print_lr": true
},
{
"target": "ValidationHandler",
"validator": "@validate#evaluator",
"epoch_level": true,
"interval": "@val_interval"
},
{
"target": "StatsHandler",
"tag_name": "train_loss",
"output_transform": "$monai.handlers.from_engine(['loss'], first=True)"
},
{
"target": "TensorBoardStatsHandler",
"log_dir": "@output_dir",
"tag_name": "train_loss",
"output_transform": "$monai.handlers.from_engine(['loss'], first=True)"
}
],
"key_metric": {
"train_mean_dice": {
"target": "MeanDice",
"include_background": true,
"output_transform": "$monai.handlers.from_engine(['pred', 'label'])"
}
},
"trainer": {
"target": "SupervisedTrainer",
"max_epochs": "@epochs",
"device": "@device",
"train_data_loader": "@train#dataloader",
"network": "@network",
"loss_function": "@loss",
"optimizer": "@optimizer",
"inferer": "@train#inferer",
"postprocessing": "@train#postprocessing",
"key_train_metric": "@train#key_metric",
"train_handlers": "@train#handlers",
"amp": "@amp"
}
},
"validate": {
"preprocessing": {
"target": "Compose",
"transforms": "$@train#preprocessing_transforms"
},
"dataset": {
"target": "Dataset",
"data": "@val_datalist",
"transform": "@validate#preprocessing"
},
"dataloader": {
"target": "DataLoader",
"dataset": "@validate#dataset",
"batch_size": 1,
"shuffle": false,
"num_workers": 4
},
"inferer": {
"target": "SlidingWindowInferer",
"roi_size": [
240,
240,
160
],
"sw_batch_size": 1,
"overlap": 0.5
},
"postprocessing": {
"target": "Compose",
"transforms": [
{
"target": "Activationsd",
"keys": "pred",
"sigmoid": true
},
{
"target": "AsDiscreted",
"keys": "pred",
"threshold": 0.5
},
{
"target": "SplitDimd",
"keys": [
"pred",
"label"
],
"output_postfixes": [
"tc",
"wt",
"et"
]
}
]
},
"handlers": [
{
"target": "StatsHandler",
"iteration_log": false
},
{
"target": "TensorBoardStatsHandler",
"log_dir": "@output_dir",
"iteration_log": false
},
{
"target": "CheckpointSaver",
"save_dir": "@ckpt_dir",
"save_dict": {
"model": "@network"
},
"save_key_metric": true,
"key_metric_filename": "model.pt"
}
],
"key_metric": {
"val_mean_dice": {
"target": "MeanDice",
"include_background": true,
"output_transform": "$monai.handlers.from_engine(['pred', 'label'])"
}
},
"additional_metrics": {
"val_mean_dice_tc": {
"target": "MeanDice",
"include_background": true,
"output_transform": "$monai.handlers.from_engine(['pred_tc', 'label_tc'])"
},
"val_mean_dice_wt": {
"target": "MeanDice",
"include_background": true,
"output_transform": "$monai.handlers.from_engine(['pred_wt', 'label_wt'])"
},
"val_mean_dice_et": {
"target": "MeanDice",
"include_background": true,
"output_transform": "$monai.handlers.from_engine(['pred_et', 'label_et'])"
}
},
"evaluator": {
"target": "SupervisedEvaluator",
"device": "@device",
"val_data_loader": "@validate#dataloader",
"network": "@network",
"inferer": "@validate#inferer",
"postprocessing": "@validate#postprocessing",
"key_val_metric": "@validate#key_metric",
"additional_metrics": "@validate#additional_metrics",
"val_handlers": "@validate#handlers",
"amp": "@amp"
}
},
"training": [
"$monai.utils.set_determinism(seed=123)",
"$setattr(torch.backends.cudnn, 'benchmark', True)",
"$@train#trainer.run()"
]
}

Edited train.json code included in brats_mri_segmentation_v0.3.3
{
"schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json",
"version": "0.3.3",
"changelog": {
"0.3.3": "update to use monai 1.0.1",
"0.3.2": "enhance readme on commands example",
"0.3.1": "fix license Copyright error",
"0.3.0": "update license files",
"0.2.1": "fix network_data_format error",
"0.2.0": "unify naming",
"0.1.1": "update for MetaTensor",
"0.1.0": "complete the model package"
},
"monai_version": "1.0.1",
"pytorch_version": "1.13.0",
"numpy_version": "1.22.4",
"optional_packages_version": {
"nibabel": "4.0.1",
"pytorch-ignite": "0.4.9",
"scikit-learn": "1.1.3",
"tensorboard": "2.10.1"
},
"task": "Multimodal Brain Tumor segmentation",
"description": "A pre-trained model for volumetric (3D) segmentation of brain tumor subregions from multimodal MRIs based on BraTS 2018 data",
"authors": "MONAI team",
"copyright": "Copyright (c) MONAI Consortium",
"data_source": "https://www.med.upenn.edu/sbia/brats2018/data.html",
"data_type": "nibabel",
"image_classes": "4 channel data, T1c, T1, T2, FLAIR at 1x1x1 mm",
"label_classes": "3 channel data, channel 0 for Tumor core, channel 1 for Whole tumor, channel 2 for Enhancing tumor",
"pred_classes": "3 channels data, same as label_classes",
"eval_metrics": {
"val_mean_dice": 0.8518,
"val_mean_dice_tc": 0.8559,
"val_mean_dice_wt": 0.9026,
"val_mean_dice_et": 0.7905
},
"intended_use": "This is an example, not to be used for diagnostic purposes",
"references": [
"Myronenko, Andriy. '3D MRI brain tumor segmentation using autoencoder regularization.' International MICCAI Brainlesion Workshop. Springer, Cham, 2018. https://arxiv.org/abs/1810.11654"
],
"network_data_format": {
"inputs": {
"image": {
"type": "image",
"format": "magnitude",
"modality": "MR",
"num_channels": 1,
"spatial_shape": [
"8n",
"8n",
"8n"
],
"dtype": "float32",
"value_range": [],
"is_patch_data": true,
"channel_def": {
"0": "T1c",
"1": "T1",
"2": "T2",
"3": "FLAIR"
}
}
},
"outputs": {
"pred": {
"type": "image",
"format": "segmentation",
"num_channels": 3,
"spatial_shape": [
"8n",
"8n",
"8n"
],
"dtype": "float32",
"value_range": [
0,
1
],
"is_patch_data": true,
"channel_def": {
"0": "Tumor core",
"1": "Whole tumor",
"2": "Enhancing tumor"
}
}
}
}
}

I edited only total 6 lines.
nference.json
-in_channels : 1
-ensure_channel_first" : true
train.json
-in_channels : 1
-ensure_channel_first" : true
metadata.json
-In "inputs" section, num_channel: 1

this place is wrong:
"keys": [
"image",
"label",
"ensure_channel_first": true
]

"ensure_channel_first" should not be inside the list of "keys", it is another arg.

@yiheng-wang-nv
Someone uploaded as demo video how to edit json files .
https://github.com/Project-MONAI/MONAILabel/issues/1051
https://user-images.githubusercontent.com/11991079/194732741-6d55c171-0eb6-4661-97fc-8fa0004897be.mp4
The person input "ensure_channel_first" inside "keys".
Then, where should I put "ensure_channel_first"?

            {
                "_target_": "LoadImaged",
                "keys": [
                    "image",
                    "label"
                ],
                "ensure_channel_first": true
            },

Thank you for helping me @yiheng-wang-nv
I edited inference.json and train.json code as you let me know.

Edited inference.json code
"preprocessing": {
"target": "Compose",
"transforms": [
{
"target": "LoadImaged",
"keys": [
"image",
],
"ensure_channel_first":true
},
{
"target": "NormalizeIntensityd",
"keys": "image",
"nonzero": true,
"channel_wise": true
}
]
},

Edited train.json code
"preprocessing_transforms": [
{
"target": "LoadImaged",
"keys": [
"image",
"label"
],
"ensure_channel_firts": true
},
When I input as following, it occurs bottom error.

[2022-11-22 16:24:42,505] [12688] [MainThread] [ERROR] (uvicorn.error:119) - Traceback (most recent call last):
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\site-packages\starlette\routing.py", line 635, in lifespan
async with self.lifespan_context(app):
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\site-packages\starlette\routing.py", line 530, in aenter
await self.router.startup()
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\site-packages\starlette\routing.py", line 612, in startup
await handler()
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\site-packages\monailabel\app.py", line 106, in startup_event
instance = app_instance()
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\site-packages\monailabel\interfaces\utils\app.py", line 51, in app_instance
app = c(app_dir=app_dir, studies=studies, conf=conf)
File "C:\Users\TRL 3D\apps\monaibundle\main.py", line 90, in init
super().init(
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\site-packages\monailabel\interfaces\app.py", line 95, in init
self.infers = self.init_infers()
File "C:\Users\TRL 3D\apps\monaibundle\main.py", line 105, in init_infers
i = BundleInferTask(b, self.conf)
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\site-packages\monailabel\tasks\infer\bundle.py", line 95, in init
self.bundle_config.read_config(os.path.join(path, "configs", config_paths[0]))
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\site-packages\monai\bundle\config_parser.py", line 300, in read_config
content.update(self.load_config_files(f, **kwargs))
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\site-packages\monai\bundle\config_parser.py", line 403, in load_config_files
for k, v in (cls.load_config_file(i, **kwargs)).items():
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\site-packages\monai\bundle\config_parser.py", line 382, in load_config_file
return json.load(f, **kwargs)
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\json_init.py", line 293, in load
return loads(fp.read(),
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\json_init.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 40 column 16 (char 1182)
[2022-11-22 16:24:42,506] [12688] [MainThread] [ERROR] (uvicorn.error:56) - Application startup failed. Exiting.

Dear @yiheng-wang-nv
Sorry for bothering you, but let me know how to perfectly run 'Auto Segmentation' using 'brats_mri_segmentation_v0.3.3'.

This place in inference config is wrong:
"preprocessing": {
"target": "Compose",
"transforms": [
{
"target": "LoadImaged",
"keys": [
"image",
],
"ensure_channel_first":true
},

the comma after "image" will raise the error, and actually only one key named "image" is used, there is no need to put it into a list.
You can do:
"keys": "image",

or
"keys": ["image"],

edited inference.json code
"preprocessing": {
"target": "Compose",
"transforms": [
{
"target": "LoadImaged",
"keys": ["image"],
"ensure_channel_first": true
},

edited train.json code
"train": {
"preprocessing_transforms": [
{
"target": "LoadImaged",
"keys": [
"image",
"label"
],
"ensure_channel_firt": true
},
The result also occurs same error :
[2022-11-22 17:52:02,288] [956] [MainThread] [ERROR] (uvicorn.error:119) - Traceback (most recent call last):
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\site-packages\starlette\routing.py", line 635, in lifespan
async with self.lifespan_context(app):
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\site-packages\starlette\routing.py", line 530, in aenter
await self.router.startup()
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\site-packages\starlette\routing.py", line 612, in startup
await handler()
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\site-packages\monailabel\app.py", line 106, in startup_event
instance = app_instance()
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\site-packages\monailabel\interfaces\utils\app.py", line 51, in app_instance
app = c(app_dir=app_dir, studies=studies, conf=conf)
File "C:\Users\TRL 3D\apps\monaibundle\main.py", line 90, in init
super().init(
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\site-packages\monailabel\interfaces\app.py", line 95, in init
self.infers = self.init_infers()
File "C:\Users\TRL 3D\apps\monaibundle\main.py", line 105, in init_infers
i = BundleInferTask(b, self.conf)
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\site-packages\monailabel\tasks\infer\bundle.py", line 95, in init
self.bundle_config.read_config(os.path.join(path, "configs", config_paths[0]))
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\site-packages\monai\bundle\config_parser.py", line 300, in read_config
content.update(self.load_config_files(f, **kwargs))
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\site-packages\monai\bundle\config_parser.py", line 403, in load_config_files
for k, v in (cls.load_config_file(i, **kwargs)).items():
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\site-packages\monai\bundle\config_parser.py", line 382, in load_config_file
return json.load(f, **kwargs)
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\json_init.py", line 293, in load
return loads(fp.read(),
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\json_init.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\TRL 3D\AppData\Local\Programs\Python\Python39\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 40 column 16 (char 1182)

[2022-11-22 17:52:02,288] [956] [MainThread] [ERROR] (uvicorn.error:56) - Application startup failed. Exiting.

ensure_channel_first

I modified the inference.json into:
    "preprocessing": {
        "_target_": "Compose",
        "transforms": [
            {
                "_target_": "LoadImaged",
                "keys": ["image"],
                "ensure_channel_first": false
            },

and run the bundle inference command and no error happened. Since you did not post the actual json file here, I'm not able to detect more about it. If possible, please push your changes into your forked repo, and attach the link, thanks!

Hi @ulphypro
I modified the inference.json into:
    "preprocessing": {
        "_target_": "Compose",
        "transforms": [
            {
                "_target_": "LoadImaged",
                "keys": ["image"],
                "ensure_channel_first": false
            },

and run the bundle inference command and no error happened. Since you did not post the actual json file here, I'm not able to detect more about it. If possible, please push your changes into your forked repo, and attach the link, thanks!

By run the bundle inference command and no error happened you mean using the command line interface, right?

Dear @yiheng-wang-nv
Error associated with inference.json doesn't occur any more. Thank you for helping me.

@diazandr3s
I downloaded BraTS2021 dataset as you mention.
Should I run using apps/radiology with BraTS2021 dataset?
After starting monailabel server using command 'monailabel start_server --app apps/radiology --studies datasets/Task01_BrainTumour/imagesTr --conf models segmentation' in Window Powershell, I can't run 3D-Slicer.
Because It doesn't support segmentation associated with brain tumor.
Person that I posted in Project-MONAI/model-zoo#239 is also me.

@diazandr3s
I downloaded BraTS2021 dataset as you mention.
Should I run using apps/radiology with BraTS2021 dataset?
After starting monailabel server using command 'monailabel start_server --app apps/radiology --studies datasets/Task01_BrainTumour/imagesTr --conf models segmentation' in Window Powershell, I can't run 3D-Slicer.
Because It doesn't support segmentation associated with brain tumor.
Person that I posted in https://github.com/Project-MONAI/model-zoo/issues/239 is also me.

Again, the BRATS dataset has 4 modalities (four image tensors) per patient/case. If you used Task01 dataset from the Medical Segmentation Decathlon, you're using all four modalities in a single nifti file. This DO NOT work  as is with Slicer: https://github.com/Project-MONAI/MONAILabel/issues/1051#issuecomment-1295108353
This is what I recommend: https://github.com/Project-MONAI/MONAILabel/issues/1051#issuecomment-1328049337
Hope that helps,

Hi,
I'm always getting an error on the 9th epoch of the training. Why is this the case?
Val 9/50 221/250 , dice_tc: 0.7409106 , dice_wt: 0.837617 , dice_et: 0.78997755 , time 4.82s
Val 9/50 222/250 , dice_tc: 0.74006385 , dice_wt: 0.8375687 , dice_et: 0.7895737 , time 4.82s
RuntimeError                              Traceback (most recent call last)
 in <cell line: 11>()
9     loss_epochs,
10     trains_epoch,
---> 11 ) = trainer(
12     model=model,
13     train_loader=train_loader,
5 frames
/usr/local/lib/python3.10/dist-packages/torch/_utils.py in reraise(self)
692             # instantiate since we don't know how to
693             raise RuntimeError(msg) from None
--> 694         raise exception
695
696
RuntimeError: Caught RuntimeError in DataLoader worker process 1.
Original Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/nibabel/loadsave.py", line 90, in load
stat_result = os.stat(filename)
FileNotFoundError: [Errno 2] No such file or directory: '/content/drive/MyDrive/EdenSehat/BraTS2021_Training_Data/TrainingData/TrainingData/BraTS2021_00390/BraTS2021_00390_flair.nii.gz'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/monai/transforms/transform.py", line 141, in apply_transform
return _apply_transform(transform, data, unpack_items, lazy, overrides, log_stats)
File "/usr/local/lib/python3.10/dist-packages/monai/transforms/transform.py", line 98, in _apply_transform
return transform(data, lazy=lazy) if isinstance(transform, LazyTrait) else transform(data)
File "/usr/local/lib/python3.10/dist-packages/monai/transforms/io/dictionary.py", line 162, in call
data = self.loader(d[key], reader)
File "/usr/local/lib/python3.10/dist-packages/monai/transforms/io/array.py", line 255, in call
img = reader.read(filename)
File "/usr/local/lib/python3.10/dist-packages/monai/data/image_reader.py", line 908, in read
img = nib.load(name, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/nibabel/loadsave.py", line 92, in load
raise FileNotFoundError(f"No such file or no access: '{filename}'")
FileNotFoundError: No such file or no access: '/content/drive/MyDrive/EdenSehat/BraTS2021_Training_Data/TrainingData/TrainingData/BraTS2021_00390/BraTS2021_00390_flair.nii.gz'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/monai/transforms/transform.py", line 141, in apply_transform
return _apply_transform(transform, data, unpack_items, lazy, overrides, log_stats)
File "/usr/local/lib/python3.10/dist-packages/monai/transforms/transform.py", line 98, in _apply_transform
return transform(data, lazy=lazy) if isinstance(transform, LazyTrait) else transform(data)
File "/usr/local/lib/python3.10/dist-packages/monai/transforms/compose.py", line 335, in call
result = execute_compose(
File "/usr/local/lib/python3.10/dist-packages/monai/transforms/compose.py", line 111, in execute_compose
data = apply_transform(
File "/usr/local/lib/python3.10/dist-packages/monai/transforms/transform.py", line 171, in apply_transform
raise RuntimeError(f"applying transform {transform}") from e
RuntimeError: applying transform <monai.transforms.io.dictionary.LoadImaged object at 0x7c01153aa680>
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
data = fetcher.fetch(index)
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py", line 51, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/usr/local/lib/python3.10/dist-packages/monai/data/dataset.py", line 112, in getitem
return self._transform(index)
File "/usr/local/lib/python3.10/dist-packages/monai/data/dataset.py", line 98, in _transform
return apply_transform(self.transform, data_i) if self.transform is not None else data_i
File "/usr/local/lib/python3.10/dist-packages/monai/transforms/transform.py", line 171, in apply_transform
raise RuntimeError(f"applying transform {transform}") from e
RuntimeError: applying transform <monai.transforms.compose.Compose object at 0x7c01153abee0>

FileNotFoundError: No such file or no access: '/content/drive/MyDrive/EdenSehat/BraTS2021_Training_Data/TrainingData/TrainingData/BraTS2021_00390/BraTS2021_00390_flair.nii.gz'

Hi @EdenSehatAI, from the error message, seems missing this file.


Discrepancy between Comby.live and CLI

Describe the bug
I'm trying to strip out all comments in OCaml files. I have the a working example on comby.live which is typically what I use to prototype a script.
However, when I run the script output by Run in Terminal button in Comby.live, it fails to strip the comments. For reference, i've uploaded a replica of my local files in this gist: https://gist.github.com/d4hines/2a61fe88c2a8a555157a25ae57dfce69
Thanks for any help you can provide with this!
Reproducing
See above links.
Expected behavior
Comby.live and the CLI should produce the same outputs.
Additional context
Add any other context about the problem here.

Hey thanks for the note and sorry about this. I've updated comby.live to stop this discrepancy from happening. With more recent CLI versions a flag is needed -match-newline-at-toplevel to get the same behavior (which is what the terminal button will show now). At some point the need for this flag will go away, I've been experimenting with different match behaviors to make this sort of thing less of an issue.

Also thanks for the files, I did check that the copy command works as expected

Cool, thanks!


Fix compare_ in binaryExpr.js

The unit test seems pretty incomplete. Will work on adding some tests involving nodesets.


feat: different dev/pro behaviour for warnings

Closes #93

Current dependencies on/for this PR:

main

PR #94   👈

This stack of pull requests is managed by Graphite.


Forget password

I am having trouble login my appollo account. it keeps showing 'Unable to log in with provided credentials.' with any password that I can think of.
Maybe I did remember the wrong password, is there any way to reset my password?
Thank you in advance

Hi, you can reset your password on the website: https://appollo.space/user/password_reset/

Thanks. Helps a lot.


Page to request user to send email to grant access

Is your feature request related to a problem? Please describe.
Page to request user to send email to Mike Shasko gov email to grant access.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

@ZoeSimon The only thing outstanding is the generic email to set on the 'request access' page.  Not an immediate issue while its all still under development of course.

@ZoeSimon The only thing outstanding is the generic email to set on the 'request access' page.  Not an immediate issue while its all still under development of course.

@ZoeSimon The only thing outstanding is the generic email to set on the 'request access' page. Not an immediate issue while its all still under development of course. I added a ticket to the backlog #478

Awesome thanks for the heads up @NickPhura, I'm just working on getting some coding for the inbox creation, then we can move forward.

@ZoeSimon The only thing outstanding is the generic email to set on the 'request access' page. Not an immediate issue while its all still under development of course. I added a ticket to the backlog #478

Awesome thanks for the heads up @NickPhura, I'm just working on getting some coding for the inbox creation, then we can move forward.


How to get the program to analyse all the previous commits and increase the version number in a cumulative way

I'm interested in using the "release flow" branching strategy which relies on (briefly)

having a single main branch
feature branches are cut from main and then merged back in
at the end of a sprint, a release branch is cut from main

At that point I expected python-semantic-release to analyse the conventional commits to cumulatively increase the version number. For example

My current version number is 0.5.0 in terms of last tag in main and what is in __version__.py.
I have made the following commits since 0.5.0

* 4cd3a20 fix: version should be 0.8.1
* 539864a feat: version should be 0.8.0
* f064516 feat: version should be 0.7.0
* 5e5cd40 feat: version should be 0.6.0
* d95d656 (tag: 0.5.0, origin/master, origin/HEAD, master) 0.5.0

However, when I run poetry run semantic-release --noop -vv --config pyproject.toml version --print in the release branch, the version comes out as 0.6.0. See debug log below
I expected this to be 0.8.1 as I thought the commit changes were cumulative. Is there a way to enable this or is this just not the way it is done?
Many thanks! :)
[20:15:13] DEBUG    [semantic_release.cli.commands.main] DEBUG main.main: logging level set to: DEBUG                                                                                main.py:105
🛡 You are running in no-operation mode, because the '--noop' flag was supplied
           DEBUG    [semantic_release.cli.commands.main] DEBUG main.main: global cli options: GlobalCommandLineOptions(noop=True, verbosity=2, config_file='pyproject.toml', strict=False)                                  main.py:123
           INFO     [semantic_release.cli.util] INFO util.load_raw_config_file: Loading configuration from pyproject.toml                                                                                util.py:78
           DEBUG    [semantic_release.cli.util] DEBUG util.load_raw_config_file: Trying to parse configuration pyproject.toml in TOML format                                                                                util.py:81
           INFO     [semantic_release.cli.config] INFO config.select_branch_options: Using group 'master' options, as 'master|feat/*' matches 'feat/another-something'                                                    config.py:238
           DEBUG    [semantic_release.cli.config] DEBUG config.from_raw_config: hvcs token is not set                                                                                config.py:363
           DEBUG    [semantic_release.changelog.template] DEBUG template.environment: {'template_dir': 'templates', 'block_start_string': '{%', 'block_end_string': '%}', 'variable_start_string': '{{',                 template.py:55
                    'variable_end_string': '}}', 'comment_start_string': '{#', 'comment_end_string': '#}', 'line_statement_prefix': None, 'line_comment_prefix': None, 'trim_blocks': False, 'lstrip_blocks': False,
                    'newline_sequence': '\n', 'keep_trailing_newline': False, 'extensions': (), 'autoescape': True, 'autoescape_value': True}
           DEBUG    [semantic_release.version.translator] DEBUG translator._invert_tag_format_to_re: inverted tag_format '{version}' to '(?P<version>.*)'                                                              translator.py:40
           DEBUG    [semantic_release.cli.commands.version] DEBUG version.is_forced_prerelease: force_prerelease = False, force_level = None, prerelease = False                                                          version.py:47
           DEBUG    [semantic_release.version.version] DEBUG version.parse: attempting to parse string '0.1.0' as Version                                                                                version.py:121
           DEBUG    [semantic_release.version.version] DEBUG version.parse: version string 0.1.0 parsed as a non-prerelease                                                                                version.py:145
           DEBUG    [semantic_release.version.version] DEBUG version.parse: parsed build metadata '' from version string 0.1.0                                                                                version.py:148
           DEBUG    [semantic_release.version.version] DEBUG version.parse: attempting to parse string '0.2.0' as Version                                                                                version.py:121
           DEBUG    [semantic_release.version.version] DEBUG version.parse: version string 0.2.0 parsed as a non-prerelease                                                                                version.py:145
           DEBUG    [semantic_release.version.version] DEBUG version.parse: parsed build metadata '' from version string 0.2.0                                                                                version.py:148
           DEBUG    [semantic_release.version.version] DEBUG version.parse: attempting to parse string '0.3.0' as Version                                                                                version.py:121
           DEBUG    [semantic_release.version.version] DEBUG version.parse: version string 0.3.0 parsed as a non-prerelease                                                                                version.py:145
           DEBUG    [semantic_release.version.version] DEBUG version.parse: parsed build metadata '' from version string 0.3.0                                                                                version.py:148
           DEBUG    [semantic_release.version.version] DEBUG version.parse: attempting to parse string '0.4.0' as Version                                                                                version.py:121
           DEBUG    [semantic_release.version.version] DEBUG version.parse: version string 0.4.0 parsed as a non-prerelease                                                                                version.py:145
           DEBUG    [semantic_release.version.version] DEBUG version.parse: parsed build metadata '' from version string 0.4.0                                                                                version.py:148
           DEBUG    [semantic_release.version.version] DEBUG version.parse: attempting to parse string '0.5.0' as Version                                                                                version.py:121
           DEBUG    [semantic_release.version.version] DEBUG version.parse: version string 0.5.0 parsed as a non-prerelease                                                                                version.py:145
           DEBUG    [semantic_release.version.version] DEBUG version.parse: parsed build metadata '' from version string 0.5.0                                                                                version.py:148
           INFO     [semantic_release.version.algorithm] INFO algorithm.tags_and_versions: found 5 previous tags                                                                                algorithm.py:60
           INFO     [semantic_release.version.algorithm] INFO algorithm.next_version: Found 5 full releases (excluding prereleases)                                                                                algorithm.py:255
           DEBUG    [semantic_release.version.version] DEBUG version.parse: attempting to parse string '0.0.0' as Version                                                                                version.py:121
           DEBUG    [semantic_release.version.version] DEBUG version.parse: version string 0.0.0 parsed as a non-prerelease                                                                                version.py:145
           DEBUG    [semantic_release.version.version] DEBUG version.parse: parsed build metadata '' from version string 0.0.0                                                                                version.py:148
           INFO     [semantic_release.version.algorithm] INFO algorithm.next_version: The last full release was 0.5.0, tagged as '0.5.0'                                                                               algorithm.py:277
           DEBUG    [git.cmd] DEBUG cmd.execute: Popen(['git', 'merge-base', '0.5.0', 'feat/another-something'],                                                                                cmd.py:1057
                    cwd=/media/bsgt/jogi1/XX_local_PSYNC_linux2/XXX_CONTRACTING/stablecaps/0000_STABLECAPS_GITREPOS/test_gitflow_helpohelpo, stdin=None, shell=False, universal_newlines=False)
           DEBUG    [git.cmd] DEBUG cmd.execute: Popen(['git', 'cat-file', '--batch-check'], cwd=/media/bsgt/jogi1/XX_local_PSYNC_linux2/XXX_CONTRACTING/stablecaps/0000_STABLECAPS_GITREPOS/test_gitflow_helpohelpo,       cmd.py:1057
                    stdin=<valid stream>, shell=False, universal_newlines=False)
           DEBUG    [git.cmd] DEBUG cmd.execute: Popen(['git', 'cat-file', '--batch'], cwd=/media/bsgt/jogi1/XX_local_PSYNC_linux2/XXX_CONTRACTING/stablecaps/0000_STABLECAPS_GITREPOS/test_gitflow_helpohelpo,             cmd.py:1057
                    stdin=<valid stream>, shell=False, universal_newlines=False)
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.bfs: checking if tag '0.5.0' (d95d656314e0c70132cd8cbf6de1625630c9d3bc) matches commit d95d656314e0c70132cd8cbf6de1625630c9d3bc                algorithm.py:89
           INFO     [semantic_release.version.algorithm] INFO algorithm.bfs: found latest version in branch history: '0.5.0' (d95d656)                                                                                algorithm.py:96
           INFO     [semantic_release.version.algorithm] INFO algorithm._bfs_for_latest_version_in_history: the latest version in this branch's history is 0.5.0                                                       algorithm.py:115
           INFO     [semantic_release.version.algorithm] INFO algorithm.next_version: The last full version in this branch's history was 0.5.0                                                                         algorithm.py:302
           DEBUG    [git.cmd] DEBUG cmd.execute: Popen(['git', 'rev-list', '0.5.0...', '--'], cwd=/media/bsgt/jogi1/XX_local_PSYNC_linux2/XXX_CONTRACTING/stablecaps/0000_STABLECAPS_GITREPOS/test_gitflow_helpohelpo,      cmd.py:1057
                    stdin=None, shell=False, universal_newlines=False)
           DEBUG    [semantic_release.commit_parser.angular] DEBUG angular.parse: commit b0232162b07f53eea12cdf5e92c17493a462320d introduces a minor level_bump                                                          angular.py:125
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: adding minor to the levels identified in commits_since_last_full_release                                                        algorithm.py:328
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.5.0' (d95d656314e0c70132cd8cbf6de1625630c9d3bc) matches commit b0232162b07f53eea12cdf5e92c17493a462320d       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.4.0' (7c884c266b67e405d6b97c1d3784819be8867b9d) matches commit b0232162b07f53eea12cdf5e92c17493a462320d       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.3.0' (c80a7aec7472d11a2d5f51552f3ce3760dc45750) matches commit b0232162b07f53eea12cdf5e92c17493a462320d       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.2.0' (3c88647f5746212faf5abf086c0f4ca69b14f691) matches commit b0232162b07f53eea12cdf5e92c17493a462320d       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.1.0' (dcae5b5b75d98a6dd929b5137d488c0e114e2305) matches commit b0232162b07f53eea12cdf5e92c17493a462320d       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: no tags correspond to commit b0232162b07f53eea12cdf5e92c17493a462320d                                                           algorithm.py:369
           DEBUG    [semantic_release.commit_parser.angular] DEBUG angular.parse: commit 4cd3a206c43c3da3e5c323bad9059644b0242f46 introduces a patch level_bump                                                          angular.py:125
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: adding patch to the levels identified in commits_since_last_full_release                                                        algorithm.py:328
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.5.0' (d95d656314e0c70132cd8cbf6de1625630c9d3bc) matches commit 4cd3a206c43c3da3e5c323bad9059644b0242f46       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.4.0' (7c884c266b67e405d6b97c1d3784819be8867b9d) matches commit 4cd3a206c43c3da3e5c323bad9059644b0242f46       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.3.0' (c80a7aec7472d11a2d5f51552f3ce3760dc45750) matches commit 4cd3a206c43c3da3e5c323bad9059644b0242f46       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.2.0' (3c88647f5746212faf5abf086c0f4ca69b14f691) matches commit 4cd3a206c43c3da3e5c323bad9059644b0242f46       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.1.0' (dcae5b5b75d98a6dd929b5137d488c0e114e2305) matches commit 4cd3a206c43c3da3e5c323bad9059644b0242f46       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: no tags correspond to commit 4cd3a206c43c3da3e5c323bad9059644b0242f46                                                           algorithm.py:369
           DEBUG    [semantic_release.commit_parser.angular] DEBUG angular.parse: commit 539864aaf19d59e07ef35d33fc0893a227ada14d introduces a minor level_bump                                                          angular.py:125
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: adding minor to the levels identified in commits_since_last_full_release                                                        algorithm.py:328
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.5.0' (d95d656314e0c70132cd8cbf6de1625630c9d3bc) matches commit 539864aaf19d59e07ef35d33fc0893a227ada14d       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.4.0' (7c884c266b67e405d6b97c1d3784819be8867b9d) matches commit 539864aaf19d59e07ef35d33fc0893a227ada14d       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.3.0' (c80a7aec7472d11a2d5f51552f3ce3760dc45750) matches commit 539864aaf19d59e07ef35d33fc0893a227ada14d       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.2.0' (3c88647f5746212faf5abf086c0f4ca69b14f691) matches commit 539864aaf19d59e07ef35d33fc0893a227ada14d       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.1.0' (dcae5b5b75d98a6dd929b5137d488c0e114e2305) matches commit 539864aaf19d59e07ef35d33fc0893a227ada14d       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: no tags correspond to commit 539864aaf19d59e07ef35d33fc0893a227ada14d                                                           algorithm.py:369
           DEBUG    [semantic_release.commit_parser.angular] DEBUG angular.parse: commit f06451618e6ae44dec9e3d42f634ca4fd19b0212 introduces a minor level_bump                                                          angular.py:125
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: adding minor to the levels identified in commits_since_last_full_release                                                        algorithm.py:328
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.5.0' (d95d656314e0c70132cd8cbf6de1625630c9d3bc) matches commit f06451618e6ae44dec9e3d42f634ca4fd19b0212       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.4.0' (7c884c266b67e405d6b97c1d3784819be8867b9d) matches commit f06451618e6ae44dec9e3d42f634ca4fd19b0212       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.3.0' (c80a7aec7472d11a2d5f51552f3ce3760dc45750) matches commit f06451618e6ae44dec9e3d42f634ca4fd19b0212       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.2.0' (3c88647f5746212faf5abf086c0f4ca69b14f691) matches commit f06451618e6ae44dec9e3d42f634ca4fd19b0212       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.1.0' (dcae5b5b75d98a6dd929b5137d488c0e114e2305) matches commit f06451618e6ae44dec9e3d42f634ca4fd19b0212       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: no tags correspond to commit f06451618e6ae44dec9e3d42f634ca4fd19b0212                                                           algorithm.py:369
           DEBUG    [semantic_release.commit_parser.angular] DEBUG angular.parse: commit 5e5cd40c8ac935d3789952c45e00056b497a1068 introduces a minor level_bump                                                          angular.py:125
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: adding minor to the levels identified in commits_since_last_full_release                                                        algorithm.py:328
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.5.0' (d95d656314e0c70132cd8cbf6de1625630c9d3bc) matches commit 5e5cd40c8ac935d3789952c45e00056b497a1068       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.4.0' (7c884c266b67e405d6b97c1d3784819be8867b9d) matches commit 5e5cd40c8ac935d3789952c45e00056b497a1068       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.3.0' (c80a7aec7472d11a2d5f51552f3ce3760dc45750) matches commit 5e5cd40c8ac935d3789952c45e00056b497a1068       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.2.0' (3c88647f5746212faf5abf086c0f4ca69b14f691) matches commit 5e5cd40c8ac935d3789952c45e00056b497a1068       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: testing if tag '0.1.0' (dcae5b5b75d98a6dd929b5137d488c0e114e2305) matches commit 5e5cd40c8ac935d3789952c45e00056b497a1068       algorithm.py:350
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: no tags correspond to commit 5e5cd40c8ac935d3789952c45e00056b497a1068                                                           algorithm.py:369
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm.next_version: parsed the following distinct levels from the commits since the last release: {<LevelBump.PATCH: 2>, <LevelBump.MINOR: 3>}      algorithm.py:374
           INFO     [semantic_release.version.algorithm] INFO algorithm.next_version: The type of the next release release is: minor                                                                                algorithm.py:380
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm._increment_version: _increment_version: latest_version = 0.5.0, latest_full_version = 0.5.0, latest_full_version_in_history = 0.5.0,          algorithm.py:142
                    level_bump = minor, prerelease = False, prerelease_token = rc, major_on_zero = False
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm._increment_version: reducing version increment due to 0. version and major_on_zero=False                                                      algorithm.py:150
           DEBUG    [semantic_release.version.algorithm] DEBUG algorithm._increment_version: prerelease=false and 0.5.0 is not a prerelease; bumping with a minor release                                              algorithm.py:231
           DEBUG    [semantic_release.version.version] DEBUG version.bump: performing a minor level bump                                                                                version.py:223
0.6.0
           DEBUG    [semantic_release.version.version] DEBUG version.parse: attempting to parse string '0.1.0' as Version                                                                                version.py:121
           DEBUG    [semantic_release.version.version] DEBUG version.parse: version string 0.1.0 parsed as a non-prerelease                                                                                version.py:145
           DEBUG    [semantic_release.version.version] DEBUG version.parse: parsed build metadata '' from version string 0.1.0                                                                                version.py:148
           DEBUG    [semantic_release.version.version] DEBUG version.parse: attempting to parse string '0.2.0' as Version                                                                                version.py:121
           DEBUG    [semantic_release.version.version] DEBUG version.parse: version string 0.2.0 parsed as a non-prerelease                                                                                version.py:145
           DEBUG    [semantic_release.version.version] DEBUG version.parse: parsed build metadata '' from version string 0.2.0                                                                                version.py:148
           DEBUG    [semantic_release.version.version] DEBUG version.parse: attempting to parse string '0.3.0' as Version                                                                                version.py:121
           DEBUG    [semantic_release.version.version] DEBUG version.parse: version string 0.3.0 parsed as a non-prerelease                                                                                version.py:145
           DEBUG    [semantic_release.version.version] DEBUG version.parse: parsed build metadata '' from version string 0.3.0                                                                                version.py:148
           DEBUG    [semantic_release.version.version] DEBUG version.parse: attempting to parse string '0.4.0' as Version                                                                                version.py:121
           DEBUG    [semantic_release.version.version] DEBUG version.parse: version string 0.4.0 parsed as a non-prerelease                                                                                version.py:145
           DEBUG    [semantic_release.version.version] DEBUG version.parse: parsed build metadata '' from version string 0.4.0                                                                                version.py:148
           DEBUG    [semantic_release.version.version] DEBUG version.parse: attempting to parse string '0.5.0' as Version                                                                                version.py:121
           DEBUG    [semantic_release.version.version] DEBUG version.parse: version string 0.5.0 parsed as a non-prerelease                                                                                version.py:145
           DEBUG    [semantic_release.version.version] DEBUG version.parse: parsed build metadata '' from version string 0.5.0                                                                                version.py:148
           INFO     [semantic_release.version.algorithm] INFO algorithm.tags_and_versions: found 5 previous tags                                                                                algorithm.py:60
           INFO     [semantic_release.cli.github_actions_output] INFO github_actions_output.write_if_possible: not writing GitHub Actions output, as no file specified                                      github_actions_output.py:70

having a single main branch

feature branches are cut from main and then merged back in

This is basically what is called GitHub Flow (which is separate from Git Flow), except for 3.

at the end of a sprint, a release branch is cut from main

In most cases, I would have to caution against doing a release branch and make only a release tag on main.

I expected this to be 0.8.1 as I thought the commit changes were cumulative. Is there a way to enable this or is this just not the way it is done?

The commit changes are consolidated based on ranking between tags (not cumulative). The release tags themselves are evaluated cumulatively. I must caution against a cumulative result, as it is confusing to your users since you never actually gave them a 0.7 or 0.6.
What many people do in your situation is release when your CI passes on the merge to main. If you don't want it automatic, than you can use a manual job instead.
If you did manual right now with the commits you have, 0.6.0 is the correct result based on the conventional commit standard. A single version bump can include a myriad of features and fixes.

Thanks for the info! :)

I must caution against a cumulative result, as it is confusing to your users since you never actually gave them a 0.7 or 0.6.

I see what you mean about the potential confusion. I would have thought that would be more with regards to the major version than the minor and patch versions. I suppose it is a question of style at the end of the day. It would be nice to have the ability to cumulatively update minor and patch version numbers, but I get it if that is something that would not be desirable to support.

In most cases, I would have to caution against doing a release branch and make only a release tag on main.

May I ask if you could extrapolate on this please? Just asking because "Release Flow" seems to be a established branching strategy. So, should that not also be catered to, to some extent?
Some links:

Releaseflow
Release Flow: How We Do Branching on the VSTS Team

Thanks again for your detailed reply! :)

I see what you mean about the potential confusion. I would have thought that would be more with regards to the major version than the minor and patch versions. I suppose it is a question of style at the end of the day. It would be nice to have the ability to cumulatively update minor and patch version numbers, but I get it if that is something that would not be desirable to support.

Yes it is stylistic in nature. I always take the view of your consumers into account. This is where the version number and changelog matter. The info helps them choose what do they need to consider when adding the new software. I would suspect your changelog would be numerous versions just for one change a piece. This is definitely non-standard and people would be confused by it. You can do it but Python-Semantic Release is incompatible with this construct even if you used a custom commit parser. You will have to construct your own tooling.

In most cases, I would have to caution against doing a release branch and make only a release tag on main.

May I ask if you could extrapolate on this please? Just asking because "Release Flow" seems to be a established branching strategy. So, should that not also be catered to, to some extent?

I'm glad that you have done your research. Honestly, it's the first time I'm hearing of an actual name to this strategy. I am however aware of branching based on a release and have had personal experience here.
I read the links and I'm still a bit skeptical of some aspects of ReleaseFlow. From what I can tell, Python Semantic Release does support this strategy but we currently do not have a test suite to evaluate this workflow. I did not mean to insinuate that it's not supported.
I was cautioning against creating arbitrary branches because as I placed the concept in a category when you are supporting multiple long term versions. I consider this an advanced strategy since most smaller scale projects only tend to support the latest version. In one of my experiences, I found that we arbitrarily created a release branch for 1.0, although a month later we didn't have a 2.0, which meant main was basically the next version, so why have a 1.0 branch.
It is also out of place to see Dave Farley quoted in these articles because currently his YouTube channel says "Don't Branch", without a consideration for ReleaseFlow.

I think you have pretty much convinced me that the cumulative version number would be more trouble than it's worth.
I'm not sure I fully understood what you meant about the branching (mostly due to my ignorance). I think you possibly mean that it would be better to have a trunk based strategy with commits in the mainline being marked with a release tag? If so, wouldn't the release branch just be roughly the same in purpose? i.e. a series of committed code, the last commit being tagged as the the released state. So just another way of saving the released state. How would it make a difference to what code was supported? Wouldn't one be in the same situation (with regards to support) whatever release strategy was used?
If you have any links explaining what you meant, that would be much appreciated! :)

I'm not sure I fully understood what you meant about the branching...

I think some of the confusion is from the specific git-relevant definitions I'm using. Git uses hashes to distinguish differences between states of a repository. A hash is therefore the core reference point to a change. A commit, is the state of a repo with a subject/summary to describe it.  Everything in Git is centered around these base references. A branch is defined by its head reference but also represents a list of sequential commits together from a merge-base of another branch. A branch implies code can be added to this and the branch can move/grow.  A tag, however, is a pointer essentially to a commit location, it cannot have changes added to it. In order for a tag to move, it must be deleted and applied again to a different commit. It's only a human readable pointer to a reference.

I think you possibly mean that it would be better to have a trunk based strategy with commits in the mainline being marked with a release tag?

Regardless of which branching strategy used, I recommended that you should use release tags to point to a specific state of code which represents a specific version, not a branch.  A branch is used to make an alternative line of history of commits.  Tags are for pointing at specific permanent states of code.  Continuous Delivery advocates, like Dave Farley, state that branching hinders integration as it is more complex to simultaneously maintain multiple branches of code. If you create a release branch, essentially, you are creating a fork to deviate from the mainline.  Since ReleaseFlow uses branches after code has been integrated its not as cumbersome as feature branching or git flow can be, however, I foresee way too many branches for very little gain.

If so, wouldn't the release branch just be roughly the same in purpose? i.e. a series of committed code, the last commit being tagged as the the released state. So just another way of saving the released state.

This is why I provided my definitions above. Yes, the head of the branch marks a reference with its HEAD but it's not the purpose of a branch.  It also is way too easy to move the HEAD and versions should be as permanent as possible.  PSR's logic is centered around tags so without a tag, PSR is not going to be of much use to you.

How would it make a difference to what code was supported? Wouldn't one be in the same situation (with regards to support) whatever release strategy was used?

(pending)

Wow! Thanks for the detailed reply! I think that is really helpful! I really appreciate the time you put into this answer because it is very helpful! :)

@darkpandarts, you're welcome! Thanks for pushing me to consolidate all my thoughts into words! Cheers!


[Tana] ...

Extension
https://www.raycast.com/cheslip/tana
Description
Every time I try to send something to Tana I get a 403 error.
I am on a Mac OS Ventura.
Steps To Reproduce
No response
Current Behaviour
No response
Expected Behaviour
No response

I was getting the same error when I first set it up.
I understand that error 403 is the API saying the request is forbidden. On my end, it was because the API token I was using was wrong.
Can you double-check your token? Maybe that solves the issue.


[BUG] Axios error when tryng to receive a document message

Describe the bug
When document messages pass through the downloadContentFromMessage function, a Axios error is being thrown. The error is Intermittent, the CPU load when it happened was ok (3%).
To Reproduce
Steps to reproduce the behavior:

Created a new connection;
Receive a document message;
Pass through downloadContentFromMessage function.

Expected behavior
The message should be normally downloaded by Baileys, if any error happen in between the process, a concise error message should be thrown.
Environment (please complete the following information):

Is this on a server? R: Yes
What do your connectOptions look like?

const wsocket: Session = makeWASocket({
          logger: loggerBaileys,
          printQRInTerminal: false,
          auth: state,
          version,
          getMessage,
          shouldIgnoreJid: jid => isJidBroadcast(jid),
          patchMessageBeforeSending: message => {
            const requiresPatch = !!(
              message.buttonsMessage ||
              message.templateMessage ||
              message.listMessage
            );
            if (requiresPatch) {
              message = {
                viewOnceMessageV2: {
                  message: {
                    messageContextInfo: {
                      deviceListMetadataVersion: 2,
                      deviceListMetadata: {}
                    },
                    ...message
                  }
                }
              };
            }

            return message;
          }
        });

Do you have multiple clients on the same IP? R: Yes
Are you using a proxy? R: No

Additional context
Theses messages are being normally loaded in the WA mobile app and the Web whatsapp.
Here is a message example (censored sensitive informations):
"key": {
  "remoteJid": "######",
  "fromMe": false,
  "id": "######"
},
"messageTimestamp":<PHONE_NUMBER>,
"pushName": "######",
"broadcast": false,
"message": {
  "documentMessage": {
    "url": "######",
    "mimetype": "application/pdf",
    "title": "Orcac00514 - SPRINGER.pdf",
    "fileSha256": "######",
    "fileLength": "202328",
    "pageCount": 1,
    "mediaKey": "######",
    "fileName": "Orcac00514 - SPRINGER.pdf",
    "fileEncSha256": "######",
    "directPath": "######",
    "mediaKeyTimestamp": "1703111330",
    "contactVcard": false,
    "thumbnailDirectPath": "######",
    "thumbnailSha256": "######",
    "thumbnailEncSha256": "######",
    "jpegThumbnail": "######",
    "thumbnailHeight": 480,
    "thumbnailWidth": 339
  },
  "messageContextInfo": {
    "deviceListMetadata": {
      "senderKeyHash": "######",
      "senderTimestamp": "######",
      "senderAccountType": "######",
      "receiverAccountType": "######",
      "recipientKeyHash": "######",
      "recipientTimestamp": "######"
    },
    "deviceListMetadataVersion": 2
  }
},
"verifiedBizName": "######"

The log error:
AxiosError: Request failed with status code 403
downloadContentFromMessage args:
const stream = await downloadContentFromMessage(
    (msg.message?.audioMessage ||
      msg.message?.videoMessage ||
      msg.message?.documentMessage ||
      msg.message?.documentWithCaptionMessage?.message?.documentMessage ||
      msg.message?.imageMessage ||
      msg.message?.stickerMessage ||
      msg.message?.extendedTextMessage?.contextInfo?.quotedMessage
        ?.imageMessage ||
      msg.message?.extendedTextMessage?.contextInfo?.quotedMessage
        ?.videoMessage ||
      msg.message?.templateMessage?.fourRowTemplate?.imageMessage ||
      msg.message?.templateMessage?.hydratedTemplate?.imageMessage ||
      msg.message?.templateMessage?.hydratedFourRowTemplate?.imageMessage ||
      msg.message?.interactiveMessage?.header
        ?.imageMessage) as DownloadableMessage,
    messageType as MediaType
  );

OBS: My code (the backend of my application) does not use axios, so it couldn't be a error from my code.

i got same error issues,, how to fix the problem?

I got the same issue , but the really problem is that : The archive was encrypted by whatsapp api , so the time to bypass the crypt is to high , so the download become to slow

just use downloadMediaMessage


fix: timekeeper is now initialized

:tada: This PR is included in version 1.5.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


youtube upload

is it only downloading tiktok videos or there is a youtube upload code?

yea just download tiktoks non-watermark allvideosuser.js is working for downloading all user videos non-watermark
youtube doesn't need code it just drags and drops it will upload them all

incase you want to bypass youtube 50's daily limit upload check that repo https://github.com/Reamasa/Stekeblads-Video-Uploader

incase you want to bypass youtube 50's daily limit uploads,  check that repo https://github.com/Stekeblad/Stekeblads-Video-Uploader


export-and-import: Update repo url of Zulip Archive.

Turns out there is another Zulip Archive repo url in the documentation: https://github.com/zulip/zulip/pull/13406#issuecomment-554142604.
Testing Plan:
GIFs or Screenshots:

The test failure is a flake that we're reported to the relevant upstream library.

(Fixed, even: validator/validator#884. They just haven’t pushed a release to NPM yet.)


[BUG] ./scripts/start_local fails to start containers due to 'invalid syntax'

Describe the bug
~/s/nostream (main)> ./scripts/start_local
The local CA is already installed in the system trust store! 👍
The local CA is already installed in the Firefox trust store! 👍

Created a new certificate valid for the following names 📜
 - "nostream.localtest.me"

The certificate is at "~/nostream/scripts/../.nostr.local/certs/nostream.localtest.me.pem" and the key at "~/nostream/scripts/../.nostr.local/certs/nostream.localtest.me-key.pem" ✅

It will expire on 7 April 2025 🗓

[+] Building 8.0s (14/14) FINISHED
 => [internal] load build definition from Dockerfile                                                                                0.0s
 => => transferring dockerfile: 762B                                                                                0.0s
 => [internal] load .dockerignore                                                                                0.0s
 => => transferring context: 248B                                                                                0.0s
 => [internal] load metadata for docker.io/library/node:18-alpine3.16                                                                                0.0s
 => [build 1/6] FROM docker.io/library/node:18-alpine3.16                                                                                0.0s
 => [internal] load build context                                                                                0.0s
 => => transferring context: 1.92MB                                                                                0.0s
 => CACHED [build 2/6] WORKDIR /build                                                                                0.0s
 => CACHED [build 3/6] COPY [package.json, package-lock.json, ./]                                                                                0.0s
 => CACHED [build 4/6] RUN npm install --quiet                                                                                0.0s
 => [build 5/6] COPY . .                                                                                0.1s
 => [build 6/6] RUN npm run build                                                                                7.5s
 => CACHED [stage-1 2/4] WORKDIR /app                                                                                0.0s
 => CACHED [stage-1 3/4] COPY --from=build /build/dist .                                                                                0.0s
 => CACHED [stage-1 4/4] RUN npm install --omit=dev --quiet                                                                                0.0s
 => exporting to image                                                                                0.0s
 => => exporting layers                                                                                0.0s
 => => writing image sha256:821d683cb7a55eb88233e0724abb29b94b5f41838499acf12a169dce0094f44e                                                                                0.0s
 => => naming to docker.io/library/nostream-relay                                                                                0.0s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
WARN[0008] container c09a6a22f37f0adcac902d39d740b2bbedbbe794303d1b854a5c9f149bad9bde is missing com.docker.compose.container-number label
WARN[0008] container c09a6a22f37f0adcac902d39d740b2bbedbbe794303d1b854a5c9f149bad9bde has invalid com.docker.compose.container-number label:
[+] Running 3/0
 ⠿ Container caddy                                     Created                                                                                0.0s
 ⠿ Container cache                                     Created                                                                                0.0s
 ⠿ Container db                                        Created                                                                                0.0s
 ⠋ Container c09a6a22f37f_c09a6a22f37f_nostream-relay  Recreate                                                                                0.0s
strconv.Atoi: parsing "": invalid syntax

To Reproduce
Steps to reproduce the behavior:

git clone <url>
cd nostream
./scripts/start_local

Expected behavior
Based on the README, a local instance should start.
System:

OS: macOS Monterey - M1 Macbook Pro
Platform: Docker (installed via Docker.com instructions)
Version: 12.5.1

Additional context
I'm pretty much a Docker noob, but I did try running the commands directly from the script a bit to see if there's some issues with ENV vars or typos, and did a clean uninstall/reinstall Docker and a clean pull from the repo, but this happens every time

Did you install Docker following the steps from Docker's official guide as explained on the README.md doc in this repo?

Yep; I tried to capture that in my report, but obviously didn't make it clear. I uninstalled the previous brew install and did the install from the Docker official guide.

This looks like an bug with Docker compose. Could you try some of the suggestions presented here: https://github.com/docker/compose-cli/issues/1537

@Cameri  the suggestions presented are not useful to me. I already had --remove-orphans, and have tried using docker-system prune -f instead (also tried using both) but I still hit the error that @fcbrandon is gettng

@Cameri  the suggestions presented are not useful to me. I already had --remove-orphans, and have tried using docker-system prune -f instead (also tried using both) but I still hit the error that @fcbrandon is gettng

Could you try running ./scripts/start instead?

Alright, so tried a few things real quick based on your recommendation @Cameri to check out https://github.com/docker/compose-cli/issues/1537
Based on that, I tried the following commands (last one just for good measure):
docker system prune -f
docker compose down --remove-orphans
sudo docker system prune -f

I then ran ./scripts/start_local, and got this output (the reported error is at the bottom of course):
./scripts/start_local
The local CA is already installed in the system trust store! 👍
The local CA is already installed in the Firefox trust store! 👍

Created a new certificate valid for the following names 📜
 - "nostream.localtest.me"

The certificate is at "~/nostream/scripts/../.nostr.local/certs/nostream.localtest.me.pem" and the key at "~/nostream/scripts/../.nostr.local/certs/nostream.localtest.me-key.pem" ✅

It will expire on 8 April 2025 🗓

[+] Building 9 (14/14) FINISHED
 => [internal] load build definition from Dockerfile
 => => transferring dockerfile: 762B
 => [internal] load .dockerignore
 => => transferring context: 248B
 => [internal] load metadata for docker.io/library/node:18-alpine3.16
 => CACHED [build 1/6] FROM docker.io/library/node:18-alpine3.16
 => [internal] load build context
 => => transferring context: 1.92MB
 => [build 2/6] WORKDIR /build
 => [build 3/6] COPY [package.json, package-lock.json, ./]
 => [build 4/6] RUN npm install --quiet
 => [build 5/6] COPY . .
 => [build 6/6] RUN npm run build
 => CACHED [stage-1 2/4] WORKDIR /app
 => CACHED [stage-1 3/4] COPY --from=build /build/dist .
 => CACHED [stage-1 4/4] RUN npm install --omit=dev --quiet
 => exporting to image
 => => exporting layers
 => => writing image sha256:821d683cb7a55eb88233e0724abb29b94b5f41838499acf12a169dce0094f44e
 => => naming to docker.io/library/nostream-relay

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
[+] Running 6/5
 ⠿ Network nostr-ts-relay    Created
 ⠿ Container cache           Created
 ⠿ Container db              Created
 ⠿ Container caddy           Created
 ⠿ Container migrations      Created
 ⠿ Container nostr-ts-relay  Created
Attaching to cache, caddy, db, migrations, nostr-ts-relay
Error response from daemon: error while creating mount source path '~/nostream/.nostr/data': chown ~/nostream/.nostr/data: permission denied

I re-ran these commands:
docker system prune -f
docker compose down --remove-orphans
sudo docker system prune -f
```

The tried `./scripts/start` as recommend, and got the following:
```
~/s/nostream (main)> ./scripts/start
[+] Building  (14/14) FINISHED
 => [internal] load build definition from Dockerfile
 => => transferring dockerfile: 762B
 => [internal] load .dockerignore
 => => transferring context: 248B
 => [internal] load metadata for docker.io/library/node:18-alpine3.16
 => [internal] load build context
 => => transferring context: 1.92MB
 => [build 1/6] FROM docker.io/library/node:18-alpine3.16
 => CACHED [stage-1 2/4] WORKDIR /app
 => CACHED [build 2/6] WORKDIR /build
 => CACHED [build 3/6] COPY [package.json, package-lock.json, ./]
 => CACHED [build 4/6] RUN npm install --quiet
 => CACHED [build 5/6] COPY . .
 => CACHED [build 6/6] RUN npm run build
 => CACHED [stage-1 3/4] COPY --from=build /build/dist .
 => CACHED [stage-1 4/4] RUN npm install --omit=dev --quiet
 => exporting to image
 => => exporting layers
 => => writing image sha256:821d683cb7a55eb88233e0724abb29b94b5f41838499acf12a169dce0094f44e
 => => naming to docker.io/library/nostream-relay

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
[+] Running 5/3
 ⠿ Network nostr-ts-relay    Created
 ⠿ Container cache           Created
 ⠿ Container db              Created
 ⠿ Container migrations      Created
 ⠿ Container nostr-ts-relay  Created
Attaching to cache, db, migrations, nostr-ts-relay
Error response from daemon: error while creating mount source path '~/nostream/.nostr/db-logs': chown ~/nostream/.nostr/db-logs: permission denied
```

I'm retrying a full re-install of Docker right now. Again following the instructions from docker. I'll update once I get through that process.

So I tried the install of Docker a couple of times via the website, did some digging around and found other folks were having problems with Docker running correctly on Apple silicone. On my machine, it looked like the daemon was never running, or at least, wasn't responding.
So on a whim, I tried installing via brew, ala, brew install docker --cask.  From my clean pull of the repo, I ran,./scripts/start_local, and got the following:
nostr-ts-relay  |
nostr-ts-relay  |  ███▄    █  ▒█████    ██████ ▄▄▄█████▓ ██▀███  ▓█████ ▄▄▄       ███▄ ▄███▓
nostr-ts-relay  |  ██ ▀█   █ ▒██▒  ██▒▒██    ▒ ▓  ██▒ ▓▒▓██ ▒ ██▒▓█   ▀▒████▄    ▓██▒▀█▀ ██▒
nostr-ts-relay  | ▓██  ▀█ ██▒▒██░  ██▒░ ▓██▄   ▒ ▓██░ ▒░▓██ ░▄█ ▒▒███  ▒██  ▀█▄  ▓██    ▓██░
nostr-ts-relay  | ▓██▒  ▐▌██▒▒██   ██░  ▒   ██▒░ ▓██▓ ░ ▒██▀▀█▄  ▒▓█  ▄░██▄▄▄▄██ ▒██    ▒██
nostr-ts-relay  | ▒██░   ▓██░░ ████▓▒░▒██████▒▒  ▒██▒ ░ ░██▓ ▒██▒░▒████▒▓█   ▓██▒▒██▒   ░██▒
nostr-ts-relay  | ░ ▒░   ▒ ▒ ░ ▒░▒░▒░ ▒ ▒▓▒ ▒ ░  ▒ ░░   ░ ▒▓ ░▒▓░░░ ▒░ ░▒▒   ▓▒█░░ ▒░   ░  ░
nostr-ts-relay  | ░ ░░   ░ ▒░  ░ ▒ ▒░ ░ ░▒  ░ ░    ░      ░▒ ░ ▒░ ░ ░  ░ ▒   ▒▒ ░░  ░      ░
nostr-ts-relay  |    ░   ░ ░ ░ ░ ░ ▒  ░  ░  ░    ░        ░░   ░    ░    ░   ▒   ░      ░
nostr-ts-relay  |          ░     ░ ░        ░              ░        ░  ░     ░  ░       ░
nostr-ts-relay  |                               v1.16.0 by Cameri
nostr-ts-relay  |             NIPs implemented: 1,2,4,9,11,12,15,16,20,22,26,28,33
nostr-ts-relay  |                               5 workers started

So I'll call it success, but I definitely don't know why the brew install worked better than the installer straight from Docker. Hopefully this is helpful to someone else.


Binary doesn't use in system that don't use glibc i.e that use musl.

Hello everyone, I'm using alpine linux and I recently I tried to use the distributed binary but got a error of file not found. Using ldd and google I found it was a problem because alpine linux doesn't have glibc but the binary is linked to it. Trying to use gcompat, a compatibility layer between musl and glibc I still wans't able to run it, in ldd I still got fcntl64: symbol not found and didn't find anything googling. So my suggestion/features request would to also build the binary being linked to musl. I would help doing this if the team agreed and wanted to.

In the 1.0 release, we'll probably ship a tool that makes building custom zrok binaries a one-step process. We probably won't ship a non-glibc version of zrok by default.


[Task] Create E2E tests for workspace service

Story: #623
Description
Add an E2E for deploying a workspace-service, validating that it is deployed and updated successfully. Disabled and deleted at the end.

Per todays daily, this is a duplicate of #643 that @msebragge already has a PR for - so closing this as dupe


Module not found when defining module_name

For Mapper I have defined module_name to be Mapper since I had to push it to CocoaPods as ModelMapper. It seems like when defining this key, importing either ModelMapper or Mapper in the generated playground ends up with a No such module error.

Hm, import Mapper works just fine for me for that Pod. Good point, though, that this should take the module_name attribute into account when generating code. Did you try deleting DerivedData? :)

I did ddd, let me try it again and see what went wrong.

¯\_(ツ)_/¯


The process gets stuck (in a deadlock?) when using the RichHandler for logging

Describe the bug
I'm running a multiprocessing + multithreading app, and I was using the RichHandler. The process is a long-running process, and it always got stuck at some point. I was analyzing the dumped stack when the process got in this state using py-spy and I got to the conclusion that the problem is that the RichHandler gets stuck in this line: https://github.com/Textualize/rich/blob/v11.0.0/rich/live.py#L246
If I remove the RichHandler then I don't experience the problem anymore.
This is part of a stack trace of the thread that gets stuck (I removed some calls):
    process_renderables (rich/live.py:246)
    print (rich/console.py:1600)
    emit (rich/logging.py:154)
    handle (logging/__init__.py:954)
    callHandlers (logging/__init__.py:1661)
    handle (logging/__init__.py:1599)
    _log (logging/__init__.py:1589)
    log (logging/__init__.py:1512)
    log_it (tenacity/before_sleep.py:51)
    iter (tenacity/__init__.py:373)
    __call__ (tenacity/_asyncio.py:48)
    async_wrapped (tenacity/_asyncio.py:86)
    ...
    _run (asyncio/events.py:81)
    _run_once (asyncio/base_events.py:1859)
    run_forever (asyncio/base_events.py:570)
    run_until_complete (asyncio/base_events.py:603)
    run (asyncio/runners.py:44)
   ...
    run (threading.py:870)
    _bootstrap_inner (threading.py:932)
    _bootstrap (threading.py:890)

As I told you, the app is using multiprocessing and multithreading and also using rich progress and rich in other parts without problems. It is only the RichHandler the one causing troubles.
Unfortunately, I have no more details. Probably what I gave you is not enough, but well, I just wanted to share in case you get inspired about what could be happening.
Platform
Linux with fish cmd
python -m rich.diagnose

╭───────────────────────── <class 'rich.console.Console'> ─────────────────────────╮
│ A high level console interface.                                                  │
│                                                                                │
│ ╭──────────────────────────────────────────────────────────────────────────────╮ │
│ │ <console width=214 ColorSystem.STANDARD>                                     │ │
│ ╰──────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                │
│     color_system = 'standard'                                                    │
│         encoding = 'utf-8'                                                       │
│             file = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'> │
│           height = 45                                                            │
│    is_alt_screen = False                                                         │
│ is_dumb_terminal = False                                                         │
│   is_interactive = True                                                          │
│       is_jupyter = False                                                         │
│      is_terminal = True                                                          │
│   legacy_windows = False                                                         │
│         no_color = False                                                         │
│          options = ConsoleOptions(                                               │
│                        size=ConsoleDimensions(width=214, height=45),             │
│                        legacy_windows=False,                                     │
│                        min_width=1,                                              │
│                        max_width=214,                                            │
│                        is_terminal=True,                                         │
│                        encoding='utf-8',                                         │
│                        max_height=45,                                            │
│                        justify=None,                                             │
│                        overflow=None,                                            │
│                        no_wrap=False,                                            │
│                        highlight=None,                                           │
│                        markup=None,                                              │
│                        height=None                                               │
│                    )                                                             │
│            quiet = False                                                         │
│           record = False                                                         │
│         safe_box = True                                                          │
│             size = ConsoleDimensions(width=214, height=45)                       │
│        soft_wrap = False                                                         │
│           stderr = False                                                         │
│            style = None                                                          │
│         tab_size = 8                                                             │
│            width = 214                                                           │
╰──────────────────────────────────────────────────────────────────────────────────╯

pip freeze | grep rich

rich==11.0.0

To finish, thank you very much for Rich. It is an amazing library!

It seems this is not affecting only the RichHandler. I have another hanging process that was not using it. Here is the partial stack trace:
Thread 339 (idle): "MainThread"
    process_renderables (rich/live.py:246)
    print (rich/console.py:1600)
    write (rich/file_proxy.py:47)
    _showwarnmsg_impl (warnings.py:30)
    _showwarnmsg (warnings.py:112)
    convert (PIL/Image.py:975)
    _convert_image_to_rgb (clip/clip.py:75)
    __call__ (torchvision/transforms/transforms.py:61)
   ...
    fetch (torch/utils/data/_utils/fetch.py:32)
    _worker_loop (torch/utils/data/_utils/worker.py:287)
    run (multiprocessing/process.py:108)
    _bootstrap (multiprocessing/process.py:315)
    _launch (multiprocessing/popen_fork.py:75)
    __init__ (multiprocessing/popen_fork.py:19)
    _Popen (multiprocessing/context.py:277)
    _Popen (multiprocessing/context.py:224)
    start (multiprocessing/process.py:121)
    __init__ (torch/utils/data/dataloader.py:918)
    _get_iterator (torch/utils/data/dataloader.py:305)
    __iter__ (torch/utils/data/dataloader.py:359)
    track (rich/progress.py:701)
    ...
    _run_code (runpy.py:87)
    _run_module_as_main (runpy.py:194)

Can you run this on the latest version of Rich. There were deadlock issues in an earlier version, that I thought were fixed.

@willmcgugan sure. Tried. It is also affecting Rich 12.0,0

It's going to be tricky to investigate without any way to reproduce this.
Can you give me an idea of how you are using Rich? Is it always in conjuction with progress bars? I assume you have multiple threads doing logging?

Yes, I know :-(
@willmcgugan Let me explain the processes/threads structure in case it helps.

The main process that starts a progress bar. It lives during the whole execution.
Several child subprocesses are started. They will be doing the work. These subprocesses are created by the PyTorch Dataloader. Is not something I do myself.
Each of these subprocesses starts a thread. So there are two threads for each process. One thread is fetching data using async libraries and the other is consuming the data.
Any of the threads/processes can emit log messages.

Tried. It is also affecting Ritch 12.0,0
El lun, 14 mar 2022 a las 23:03, Will McGugan @.***>)
escribió:

Can you run this on the latest version of Rich. There were deadlock issues
in an earlier version, that I thought were fixed.
—
Reply to this email directly, view it on GitHub
https://github.com/Textualize/rich/issues/2046#issuecomment-1067346008,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAG2V2ERAEUGHEY6WNBBBTTU76ZRTANCNFSM5QM5YOWA
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID:
@.***>

Closing because I haven't managed to reproduce a deadlock with any combination of threads and the logging handler.
Re-open if you have managed to narrow it down to the latest Rich.