openmedlab / MedFM

Official Repository of NeurIPS 2023 - MedFM Challenge
https://medfm2023.grand-challenge.org/
259 stars 14 forks source link

ValueError: not enough values to unpack (expected 2, got 1) #11

Closed yys-abu closed 1 year ago

yys-abu commented 1 year ago

File "C:\Anoconda\envs\pytorch\lib\site-packages\mmengine\config\config.py", line 1830, in call key, val = kv.split('=', maxsplit=1) ValueError: not enough values to unpack (expected 2, got 1) ['C:\master\configs\vit-b_vpt\1-shot_chest.py']

MengzhangLI commented 1 year ago

Hi, I think it is caused by your modification of config files or the typo of config files.

From your description, we can see your repo is based on master branch, which uses MMPretrain and MMEngine.

You can check this config file, delete the empty line and try again.

Best,

yys-abu commented 1 year ago

Hello, I printed out the value as follows:

['C:\master\configs\swin-b_vpt\1-shot_chest.py']

The complete error message is displayed as: Traceback (most recent call last):   File "C:/master/tools/train.py", line 156, in <module>     main()   File "C:/master/tools/train.py", line 140, in main     args = parse_args()   File "C:/master/tools/train.py", line 64, in parse_args     args=parser.parse_args()   File "C:\Anoconda\envs\pytorch\lib\argparse.py", line 1768, in parse_args     args,argv=self.parse_known_args(args, namespace)   File "C:\Anoconda\envs\pytorch\lib\argparse.py", line 1799, in parse_known_args     namespace, args = self._parse_known_args(args, namespace)   File "C:\Anoconda\envs\pytorch\lib\argparse.py", line 2003, in _parse_known_args     start_index = consume_optional(start_index)   File "C:\Anoconda\envs\pytorch\lib\argparse.py", line 1944, in consume_optional     take_action(action, args, option_string)   File "C:\Anoconda\envs\pytorch\lib\argparse.py", line 1873, in take_action     action(self, namespace, argument_values, option_string)   File "C:\Anoconda\envs\pytorch\lib\site-packages\mmengine\config\config.py", line 1826, in call     key,val=kv.split('=', maxsplit=1) ValueError: not enough values to unpack (expected 2, got 1)

Process finished with exit code 1

I don't know if you have encountered the same error. May I ask which file I should modify? As a beginner, I hope to receive guidance from my predecessors. If possible, I would like to add WeChat or QQ for consultation

------------------ 原始邮件 ------------------ 发件人: "openmedlab/MedFM" @.>; 发送时间: 2023年8月7日(星期一) 下午3:38 @.>; @.**@.>; 主题: Re: [openmedlab/MedFM] ValueError: not enough values to unpack (expected 2, got 1) (Issue #11)

Hi, I think it is caused by your modification of config files or the typo of config files.

From your description, we can see your repo is based on master branch, which uses MMPretrain and MMEngine.

You can check this config file, delete the empty line and try again.

Best,

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

yys-abu commented 1 year ago

Hello, thank you very much for replying to me. Due to code error display:

    key,val=kv.split('=', maxsplit=1) ValueError: not enough values to unpack (expected 2, got 1)

I print out the kV and display it as:

C:\master\configs\swin-b_vpt\1-shot_chest.py

Only one result

I still can't solve the problem after deleting empty lines from the config file. I don't know how to solve it.

yours sincerely

------------------ 原始邮件 ------------------ 发件人: "openmedlab/MedFM" @.>; 发送时间: 2023年8月7日(星期一) 下午3:38 @.>; @.**@.>; 主题: Re: [openmedlab/MedFM] ValueError: not enough values to unpack (expected 2, got 1) (Issue #11)

Hi, I think it is caused by your modification of config files or the typo of config files.

From your description, we can see your repo is based on master branch, which uses MMPretrain and MMEngine.

You can check this config file, delete the empty line and try again.

Best,

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

MengzhangLI commented 1 year ago

Hi, sorry for late reply.

Perhaps you use wrong command: https://github.com/open-mmlab/mmcv/issues/1840

I suggest you use default main branch first (create another conda environment), when everything is ok, then try to use master branch code.

Best,