Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read config file include: https://raw.githubusercontent.com/nf-core/configs/master/nfcore_custom.config #429

Open
1 task done
meng-hhh opened this issue Jan 6, 2025 · 4 comments
Labels
Bug Something isn't working
Milestone

Comments

@meng-hhh
Copy link

meng-hhh commented Jan 6, 2025

  • 你是否在现有 Issue列表 中搜索过相同问题,但未找到?

Ⅰ. 请说明操作系统及DS的版本号:

  1. 操作系统wsl+ubuntu24.04+conda+nf-core24.10+python3.12
  2. DS版本号:RC 2

Ⅱ. 问题描述:

网页可以直接打开,但 API 读取 https://raw.githubusercontent.com/ 出错,能解决吗?

Ⅲ. 期望的结果:

Ⅳ. 如何复现问题?

Ⅴ. 请提供相关的错误日志,尽可能的详细:(日志文件在 ${user.home}/.dev-sidecar/logs/ 目录下)

点击查看日志
nf-core pipelines download   methylseq   -r 3.0.0  -x tar.gz -s singularity  -f

                                          ,--./,-.
          ___     __   __   __   ___     /,-._.--~\
    |\ | |__  __ /  ` /  \ |__) |__         }  {
    | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                          `._,._,'

    nf-core/tools version 3.1.1 - https://nf-co.re


WARNING  Could not find GitHub authentication token. Some API requests may fail.

If you are working on the same system where you will run Nextflow, you can amend the downloaded images to the ones in the$NXF_SINGULARITY_CACHEDIR folder, Nextflow will automatically find
them. However if you will transfer the downloaded files to a different system then they should be copied to the target folder.
? Copy singularity images from $NXF_SINGULARITY_CACHEDIR to the target folder or amend new images to the cache? copy
WARNING  Deleting existing output directory: 'nf-core-methylseq_3.0.0'
INFO     Saving 'nf-core/methylseq'
          Pipeline revision: '3.0.0'
          Use containers: 'singularity'
          Container library: 'quay.io'
          Using $NXF_SINGULARITY_CACHEDIR': /mnt/e/nf-core'
          Output file: 'nf-core-methylseq_3.0.0.tar.gz'
          Include default institutional configuration: 'False'
INFO     Downloading workflow files from GitHub
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/meng/miniconda3/lib/python3.9/site-packages/nf_core/utils.py:366 in run_cmd                │
│                                                                                                  │
│    363 │   full_cmd = f"{executable} {cmd}"                                                      │
│    364 │   log.debug(f"Running command: {full_cmd}")                                             │
│    365 │   try:                                                                                  │
│ ❱  366 │   │   proc = subprocess.run(shlex.split(full_cmd), capture_output=True, check=True)     │
│    367 │   │   return (proc.stdout, proc.stderr)                                                 │
│    368 │   except OSError as e:                                                                  │
│    369 │   │   if e.errno == errno.ENOENT:                                                       │
│                                                                                                  │
│ /home/meng/miniconda3/lib/python3.9/subprocess.py:528 in run                                     │
│                                                                                                  │
│    525 │   │   │   raise                                                                         │
│    526 │   │   retcode = process.poll()                                                          │
│    527 │   │   if check and retcode:                                                             │
│ ❱  528 │   │   │   raise CalledProcessError(retcode, process.args,                               │
│    529 │   │   │   │   │   │   │   │   │    output=stdout, stderr=stderr)                        │
│    530 │   return CompletedProcess(process.args, retcode, stdout, stderr)                        │
│    531                                                                                           │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
CalledProcessError: Command '['nextflow', 'config', '-flat', 'nf-core-methylseq_3.0.0/3_0_0']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/meng/miniconda3/bin/nf-core:8 in <module>                                                  │
│                                                                                                  │
│   5 from nf_core.__main__ import run_nf_core                                                     │
│   6 if __name__ == '__main__':                                                                   │
│   7 │   sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])                         │
│ ❱ 8 │   sys.exit(run_nf_core())                                                                  │
│   9                                                                                              │
│                                                                                                  │
│ /home/meng/miniconda3/lib/python3.9/site-packages/nf_core/__main__.py:182 in run_nf_core         │
│                                                                                                  │
│    179 │   │   │   log.debug(f"Could not check latest version: {e}")                             │
│    180 │   │   stderr.print("\n")                                                                │
│    181 │   # Launch the click cli                                                                │
│ ❱  182 │   nf_core_cli(auto_envvar_prefix="NFCORE")                                              │
│    183                                                                                           │
│    184                                                                                           │
│    185 @tui(                                                                                     │
│                                                                                                  │
│ /home/meng/miniconda3/lib/python3.9/site-packages/rich_click/rich_command.py:367 in __call__     │
│                                                                                                  │
│   364 │   │   # Include this here because I run into a false warning                             │
│   365 │   │   # in the PyCharm IDE otherwise; for some reason PyCharm doesn't                    │
│   366 │   │   # seem to think RichGroups are callable. (No issues with Mypy, though.)            │
│ ❱ 367 │   │   return super().__call__(*args, **kwargs)                                           │
│   368                                                                                            │
│   369                                                                                            │
│   370 class RichCommandCollection(CommandCollection, RichGroup):                                 │
│                                                                                                  │
│ /home/meng/miniconda3/lib/python3.9/site-packages/click/core.py:1161 in __call__                 │
│                                                                                                  │
│   1158 │                                                                                         │
│   1159 │   def __call__(self, *args: t.Any, **kwargs: t.Any) -> t.Any:                           │
│   1160 │   │   """Alias for :meth:`main`."""                                                     │
│ ❱ 1161 │   │   return self.main(*args, **kwargs)                                                 │
│   1162                                                                                           │
│   1163                                                                                           │
│   1164 class Command(BaseCommand):                                                               │
│                                                                                                  │
│ /home/meng/miniconda3/lib/python3.9/site-packages/rich_click/rich_command.py:152 in main         │
│                                                                                                  │
│   149 │   │   try:                                                                               │
│   150 │   │   │   try:                                                                           │
│   151 │   │   │   │   with self.make_context(prog_name, args, **extra) as ctx:                   │
│ ❱ 152 │   │   │   │   │   rv = self.invoke(ctx)                                                  │
│   153 │   │   │   │   │   if not standalone_mode:                                                │
│   154 │   │   │   │   │   │   return rv                                                          │
│   155 │   │   │   │   │   # it's not safe to `ctx.exit(rv)` here!                                │
│                                                                                                  │
│ /home/meng/miniconda3/lib/python3.9/site-packages/click/core.py:1697 in invoke                   │
│                                                                                                  │
│   1694 │   │   │   │   super().invoke(ctx)                                                       │
│   1695 │   │   │   │   sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)                    │
│   1696 │   │   │   │   with sub_ctx:                                                             │
│ ❱ 1697 │   │   │   │   │   return _process_result(sub_ctx.command.invoke(sub_ctx))               │
│   1698 │   │                                                                                     │
│   1699 │   │   # In chain mode we create the contexts step by step, but after the                │
│   1700 │   │   # base command has been invoked.  Because at that point we do not                 │
│                                                                                                  │
│ /home/meng/miniconda3/lib/python3.9/site-packages/click/core.py:1697 in invoke                   │
│                                                                                                  │
│   1694 │   │   │   │   super().invoke(ctx)                                                       │
│   1695 │   │   │   │   sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)                    │
│   1696 │   │   │   │   with sub_ctx:                                                             │
│ ❱ 1697 │   │   │   │   │   return _process_result(sub_ctx.command.invoke(sub_ctx))               │
│   1698 │   │                                                                                     │
│   1699 │   │   # In chain mode we create the contexts step by step, but after the                │
│   1700 │   │   # base command has been invoked.  Because at that point we do not                 │
│                                                                                                  │
│ /home/meng/miniconda3/lib/python3.9/site-packages/click/core.py:1443 in invoke                   │
│                                                                                                  │
│   1440 │   │   │   echo(style(message, fg="red"), err=True)                                      │
│   1441 │   │                                                                                     │
│   1442 │   │   if self.callback is not None:                                                     │
│ ❱ 1443 │   │   │   return ctx.invoke(self.callback, **ctx.params)                                │
│   1444 │                                                                                         │
│   1445 │   def shell_complete(self, ctx: Context, incomplete: str) -> t.List["CompletionItem"]:  │
│   1446 │   │   """Return a list of completions for the incomplete value. Looks                   │
│                                                                                                  │
│ /home/meng/miniconda3/lib/python3.9/site-packages/click/core.py:788 in invoke                    │
│                                                                                                  │
│    785 │   │                                                                                     │
│    786 │   │   with augment_usage_errors(__self):                                                │
│    787 │   │   │   with ctx:                                                                     │
│ ❱  788 │   │   │   │   return __callback(*args, **kwargs)                                        │
│    789 │                                                                                         │
│    790 │   def forward(__self, __cmd: "Command", *args: t.Any, **kwargs: t.Any) -> t.Any:        │
│    791 │   │   """Similar to :meth:`invoke` but fills in default keyword                         │
│                                                                                                  │
│ /home/meng/miniconda3/lib/python3.9/site-packages/click/decorators.py:33 in new_func             │
│                                                                                                  │
│    30 │   """                                                                                    │
│    31 │                                                                                          │
│    32 │   def new_func(*args: "P.args", **kwargs: "P.kwargs") -> "R":                            │
│ ❱  33 │   │   return f(get_current_context(), *args, **kwargs)                                   │
│    34 │                                                                                          │
│    35 │   return update_wrapper(new_func, f)                                                     │
│    36                                                                                            │
│                                                                                                  │
│ /home/meng/miniconda3/lib/python3.9/site-packages/nf_core/__main__.py:443 in                     │
│ command_pipelines_download                                                                       │
│                                                                                                  │
│    440 │   """                                                                                   │
│    441 │   Download a pipeline, nf-core/configs and pipeline singularity images.                 │
│    442 │   """                                                                                   │
│ ❱  443 │   pipelines_download(                                                                   │
│    444 │   │   ctx,                                                                              │
│    445 │   │   pipeline,                                                                         │
│    446 │   │   revision,                                                                         │
│                                                                                                  │
│ /home/meng/miniconda3/lib/python3.9/site-packages/nf_core/commands_pipelines.py:203 in           │
│ pipelines_download                                                                               │
│                                                                                                  │
│   200 │   │   container_cache_index,                                                             │
│   201 │   │   parallel_downloads,                                                                │
│   202 │   )                                                                                      │
│ ❱ 203 │   dl.download_workflow()                                                                 │
│   204                                                                                            │
│   205                                                                                            │
│   206 # nf-core pipelines create-params-file                                                     │
│                                                                                                  │
│ /home/meng/miniconda3/lib/python3.9/site-packages/nf_core/pipelines/download.py:258 in           │
│ download_workflow                                                                                │
│                                                                                                  │
│    255 │   │   if self.platform:                                                                 │
│    256 │   │   │   self.download_workflow_platform()                                             │
│    257 │   │   else:                                                                             │
│ ❱  258 │   │   │   self.download_workflow_static()                                               │
│    259 │                                                                                         │
│    260 │   def download_workflow_static(self):                                                   │
│    261 │   │   """Downloads a nf-core workflow from GitHub to the local file system in a self-c  │
│                                                                                                  │
│ /home/meng/miniconda3/lib/python3.9/site-packages/nf_core/pipelines/download.py:282 in           │
│ download_workflow_static                                                                         │
│                                                                                                  │
│    279 │   │   │                                                                                 │
│    280 │   │   │   # Collect all required singularity images                                     │
│    281 │   │   │   if self.container_system == "singularity":                                    │
│ ❱  282 │   │   │   │   self.find_container_images(os.path.join(self.outdir, revision_dirname))   │
│    283 │   │   │   │   self.gather_registries(os.path.join(self.outdir, revision_dirname))       │
│    284 │   │   │   │                                                                             │
│    285 │   │   │   │   try:                                                                      │
│                                                                                                  │
│ /home/meng/miniconda3/lib/python3.9/site-packages/nf_core/pipelines/download.py:720 in           │
│ find_container_images                                                                            │
│                                                                                                  │
│    717 │   │   module_findings = []                                                              │
│    718 │   │                                                                                     │
│    719 │   │   # Use linting code to parse the pipeline nextflow config                          │
│ ❱  720 │   │   self.nf_config = nf_core.utils.fetch_wf_config(Path(workflow_directory))          │
│    721 │   │                                                                                     │
│    722 │   │   # Find any config variables that look like a container                            │
│    723 │   │   for k, v in self.nf_config.items():                                               │
│                                                                                                  │
│ /home/meng/miniconda3/lib/python3.9/site-packages/nf_core/utils.py:324 in fetch_wf_config        │
│                                                                                                  │
│    321 │   log.debug("No config cache found")                                                    │
│    322 │                                                                                         │
│    323 │   # Call `nextflow config`                                                              │
│ ❱  324 │   result = run_cmd("nextflow", f"config -flat {wf_path}")                               │
│    325 │   if result is not None:                                                                │
│    326 │   │   nfconfig_raw, _ = result                                                          │
│    327 │   │   for line in nfconfig_raw.splitlines():                                            │
│                                                                                                  │
│ /home/meng/miniconda3/lib/python3.9/site-packages/nf_core/utils.py:380 in run_cmd                │
│                                                                                                  │
│    377 │   │   if executable == "nf-test":                                                       │
│    378 │   │   │   return (e.stdout, e.stderr)                                                   │
│    379 │   │   else:                                                                             │
│ ❱  380 │   │   │   raise RuntimeError(                                                           │
│    381 │   │   │   │   f"Command '{full_cmd}' returned non-zero error code '{e.returncode}':\n[  │
│    382 │   │   │   )                                                                             │
│    383                                                                                           │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
RuntimeError: Command 'nextflow config -flat nf-core-methylseq_3.0.0/3_0_0' returned non-zero error code '1':
[red]> ERROR ~ Unable to parse config file: '/mnt/e/nf-core/nf-core-methylseq_3.0.0/3_0_0/nextflow.config'

  Cannot read config file include: https://raw.githubusercontent.com/nf-core/configs/master/nfcore_custom.config

Ⅵ. 有必要时,请提供 ${user.home}/.dev-sidecar/running.json 文件内容:

@meng-hhh meng-hhh added the Bug Something isn't working label Jan 6, 2025
@wangliang181230
Copy link
Contributor

wangliang181230 commented Jan 13, 2025

你得让你的请求,走系统代理。
像浏览器的代理设置一样,可配置代理:

  1. 走系统代理;
  2. 自定义代理地址;

@wangliang181230 wangliang181230 added the 等待回复 等待用户回复的问题 label Jan 21, 2025
@wangliang181230
Copy link
Contributor

wangliang181230 commented Jan 21, 2025

是自定义远程配置文件是吗?
这个是DS内部发起的请求,暂时无法使用DS自身的直连github功能。
你还是去国内的仓库里,维护远程配置文件吧,或者也可以用github镜像地址。

@peasoft
Copy link

peasoft commented Jan 21, 2025

@wangliang181230 首先,这不是 DS 的远程配置。
其次,这里 已经有过特殊处理了。

@wangliang181230
Copy link
Contributor

wangliang181230 commented Jan 21, 2025

@wangliang181230 首先,这不是 DS 的远程配置。
其次,这里 已经有过特殊处理了。

这个特殊处理,似乎没用,我不确定 sni 设置后,实际是不是在设置 Server-Name 请求头。
估计只是设置一个请求头没用。
后面我再专门针对DS内部调用 github 的请求,重新做SNI处理。

@wangliang181230 wangliang181230 added this to the 待办事项 milestone Jan 21, 2025
@wangliang181230 wangliang181230 removed the 等待回复 等待用户回复的问题 label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants