簡體   English   中英

無法使 sen2r 函數工作,缺少一些參數?

[英]unable to get sen2r function working, some arguments missing?

我試圖使用帶有默認參數的 sen2r() 函數(包 sen2r_1.3.2),但收到以下錯誤:

Error in paste(c(...), collapse = sep) : argument is missing, with no default.

我知道錯誤要我填寫一些參數,但是源手冊明確說默認應該可以工作,並且可以在啟動GUI時隨后設置參數。

使用 s2_gui() 啟動閃亮的應用程序,但在我嘗試“保存並關閉”時一直掛起

   R version 3.6.3 (2020-02-29)
   Platform: x86_64-pc-linux-gnu (64-bit)
   Running under: Ubuntu 18.04.4 LTS

另外,有“較高聲譽”的人可以創建一個 sen2r 標簽,以便於后續通信嗎?


這是回溯...

sen2r()
Error in paste(c(...), collapse = sep) : 
  argument is missing, with no default
> traceback()
7: paste(c(...), collapse = sep)
6: strsplit(paste(c(...), collapse = sep), "\n")
5: unlist(strsplit(paste(c(...), collapse = sep), "\n"))
4: strwrap(unlist(strsplit(paste(c(...), collapse = sep), "\n")), 
       width = width, indent = indent, exdent = exdent, prefix = prefix, 
       initial = initial)
3: print_message(type = "waiting", "It seems you are running this package for the first time. ", 
       "Do you want to verify/install the required dependencies using a GUI (otherwise, an\n        automatic check will be performed)? (y/n) ", 
       )
2: .sen2r(param_list = param_list, pm_arg_passed = pm_arg_passed, 
       gui = gui, preprocess = preprocess, s2_levels = s2_levels, 
       sel_sensor = sel_sensor, online = online, order_lta = order_lta, 
       apihub = apihub, downloader = downloader, overwrite_safe = overwrite_safe, 
       rm_safe = rm_safe, step_atmcorr = step_atmcorr, sen2cor_use_dem = sen2cor_use_dem, 
       sen2cor_gipp = sen2cor_gipp, max_cloud_safe = max_cloud_safe, 
       timewindow = timewindow, timeperiod = timeperiod, extent = extent, 
       extent_name = extent_name, s2tiles_selected = s2tiles_selected, 
       s2orbits_selected = s2orbits_selected, list_prods = list_prods, 
       list_rgb = list_rgb, list_indices = list_indices, index_source = index_source, 
       rgb_ranges = rgb_ranges, mask_type = mask_type, max_mask = max_mask, 
       mask_smooth = mask_smooth, mask_buffer = mask_buffer, clip_on_extent = clip_on_extent, 
       extent_as_mask = extent_as_mask, reference_path = reference_path, 
       res = res, res_s2 = res_s2, unit = unit, proj = proj, resampling = resampling, 
       resampling_scl = resampling_scl, outformat = outformat, rgb_outformat = rgb_outformat, 
       index_datatype = index_datatype, compression = compression, 
       rgb_compression = rgb_compression, overwrite = overwrite, 
       path_l1c = path_l1c, path_l2a = path_l2a, path_tiles = path_tiles, 
       path_merged = path_merged, path_out = path_out, path_rgb = path_rgb, 
       path_indices = path_indices, path_subdirs = path_subdirs, 
       thumbnails = thumbnails, parallel = parallel, processing_order = processing_order, 
       use_python = use_python, tmpdir = tmpdir, rmtmp = rmtmp, 
       log = log, globenv = sen2r_env, .only_list_names = FALSE)
1: sen2r()

我按s2_gui()運行s2_gui() ...沒有指定參數。 但是我現在正在運行依賴項檢查,我懷疑即使對於 GUI 也應該清除問題。

此錯誤是由代碼錯誤引起的,已修復(請參閱GitHub 問題 292 )。

在 sen2r CRAN 版本更新之前,bug 可能是:

  1. 解決了安裝 sen2r GitHub 版本( remotes::install_github("ranghetti/sen2r") ),或
  2. 在運行 sen2r() 之前繞過了啟動check_gdal() ()。

這是原始代碼中的一個錯誤。

在您提供的回溯中,它包括:

3: print_message(type = "waiting", "It seems you are running this package for the first time. ", 
       "Do you want to verify/install the required dependencies using a GUI (otherwise, an\n        automatic check will be performed)? (y/n) ", 
       )

值得注意的是,我將截斷大部分字符串:

3: print_message(type = "waiting", "It seems ... time. ", 
       "Do you ... performed)? (y/n) ",  
       )                         #    ^-- extra comma, invalid R syntax

注意它是如何以逗號和右括號結尾的? 是的,這是 R 中的語法錯誤。(這已在原始存儲庫中作為問題 292提交。)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM