Comments (6)
Any idea?
from curl.
from curl.
CJK character and English only, and the file is there.
from curl.
Don't use URLencode()
. If anything you would use curl::curl_escape()
but I don't think it is necessary. I think that only works for HTTP requests, and you are using smb.
I don't know smb very well, but I am surprised we don't see more details about about the request with verbose=TRUE
.
Are you using the latest version of R? Can you show your sessionInfo()
?
Can you try to enc2utf8
the url value before passing to curl_fetch_memory?
from curl.
library(curl)
#> Using libcurl 8.3.0 with Schannel
handle <- new_handle(username = "MASKED", password = "MASKED", verbose = TRUE)
curl_fetch_memory(paste0("smb://10.86.MASKED/", curl::curl_escape(enc2utf8("新建文本文档.txt"))), handle = handle)
#> Error in curl_fetch_memory(paste0("smb://10.86.MASKED/", : Remote file not found
curl_fetch_memory(paste0("smb://10.86.MASKED/", curl::curl_escape("新建文本文档.txt")), handle = handle)
#> Error in curl_fetch_memory(paste0("smb://10.86.MASKED/", : Remote file not found
curl_fetch_memory(enc2utf8("smb://10.86.MASKED/新建文本文档.txt"), handle = handle)
#> Error in curl_fetch_memory(enc2utf8("smb://10.86.MASKED/新建文本文档.txt"), : Remote file not found
Created on 2023-12-29 with reprex v2.0.2
Session info
sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R version 4.3.2 (2023-10-31 ucrt)
#> os Windows 11 x64 (build 26010)
#> system x86_64, mingw32
#> ui RTerm
#> language en
#> collate Chinese (Simplified)_China.utf8
#> ctype Chinese (Simplified)_China.utf8
#> tz Asia/Shanghai
#> date 2023-12-29
#> pandoc 3.1.11 @ D:/Scoop/shims/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> cli 3.6.2 2023-12-11 [1] CRAN (R 4.3.2)
#> curl * 5.2.0 2023-12-08 [1] CRAN (R 4.3.2)
#> digest 0.6.33 2023-07-07 [1] CRAN (R 4.3.1)
#> evaluate 0.23 2023-11-01 [1] CRAN (R 4.3.2)
#> fastmap 1.1.1 2023-02-24 [1] CRAN (R 4.3.0)
#> fs 1.6.3 2023-07-20 [1] CRAN (R 4.3.1)
#> glue 1.6.2 2022-02-24 [1] CRAN (R 4.3.0)
#> htmltools 0.5.7 2023-11-03 [1] CRAN (R 4.3.2)
#> knitr 1.45 2023-10-30 [1] CRAN (R 4.3.2)
#> lifecycle 1.0.4 2023-11-07 [1] CRAN (R 4.3.2)
#> magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.3.0)
#> purrr 1.0.2 2023-08-10 [1] CRAN (R 4.3.1)
#> R.cache 0.16.0 2022-07-21 [1] CRAN (R 4.3.0)
#> R.methodsS3 1.8.2 2022-06-13 [1] CRAN (R 4.3.0)
#> R.oo 1.25.0 2022-06-12 [1] CRAN (R 4.3.0)
#> R.utils 2.12.3 2023-11-18 [1] CRAN (R 4.3.2)
#> reprex 2.0.2 2022-08-17 [1] CRAN (R 4.3.0)
#> rlang 1.1.2 2023-11-04 [1] CRAN (R 4.3.2)
#> rmarkdown 2.25 2023-09-18 [1] CRAN (R 4.3.1)
#> rstudioapi 0.15.0 2023-07-07 [1] CRAN (R 4.3.1)
#> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.3.0)
#> styler 1.10.2 2023-08-29 [1] CRAN (R 4.3.1)
#> vctrs 0.6.5 2023-12-01 [1] CRAN (R 4.3.2)
#> withr 2.5.2 2023-10-30 [1] CRAN (R 4.3.1)
#> xfun 0.41 2023-11-01 [1] CRAN (R 4.3.2)
#> yaml 2.3.8 2023-12-11 [1] CRAN (R 4.3.2)
#>
#> [1] D:/Scoop/persist/r/site-library
#> [2] D:/Scoop/apps/r/4.3.2/library
#>
#> ──────────────────────────────────────────────────────────────────────────────
The error message is the same as above.
from curl.
Hmm, I think it's bug of libcurl
, not the curl
package. Since I've tried download.file("smb://xxx", method = "libcurl")
and met the same error.
from curl.
Related Issues (20)
- Error in curl::handle_setopt(handle, .list = req$options): Option seekfunction (20167) has unknown or unsupported type. HOT 2
- form_data documentation is lacking
- parse_headers throws an error when a site responds with an empty header HOT 2
- Out of memory errors for libcurl ≥ 7.71.0 HOT 1
- FTP directory created successfuly, but curl returns with error HOT 3
- Feature request: Use environment variable `CURL_CA_BUNDLE` if set HOT 14
- inconsistent SSL version in vignette
- Allow users to pass pool object in `multi_download()`
- Use httpuv::randomPort() in curl_echo
- Why is curl_echo() slow sometimes HOT 2
- How to resolve "SSL: no alternative certificate subject name matches target host name '<proxy.server.address>'"
- httpuv delays in curl_echo on Linux HOT 1
- Can't get all bytes received before RST HOT 1
- installation warning: skipping pax global extended headers HOT 1
- Sudden negotiate error with 5.2.1
- Xcode Run on ios with Undefined symbol error HOT 1
- Support for request rate limiting? HOT 1
- stubbed version for (non)use in webr installs requiring curl HOT 3
- curl failure with Apple M Series and macOS Sonoma 14.5 HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from curl.