quandl / quandl-r

This is Quandl's R Package
https://cran.r-project.org/web/packages/Quandl/
Other
139 stars 55 forks source link

Error in curl::curl_fetch_memory #53

Closed ozgurorman closed 7 years ago

ozgurorman commented 7 years ago

While writing in >Quandl.search("oil") , in R studio, the error below occurs, I reinstalled the curl package but it did not help a bit. I'll be appreciated if I can get help from you.

Error in curl::curl_fetch_memory(url, handle = handle) : Problem with the SSL CA cert (path? access rights?)

junos commented 7 years ago

Hi @ozgurorman,

Thanks for your message. I tried reproducing the issue using the same steps you mentioned above, but for some reason, I cannot reproduce it. Could you please update your work environment and give it another shot or provide me with your environment setting details to help me troubleshoot?

Here is my environment for your reference:

  1. MacOS 10.12.1
  2. R-devel 3.4.0 Under development (unstable) (2016/10/26, r71594)
  3. RStudio Desktop 1.0.44
  4. curl 7.49.1 (x86_64-apple-darwin16.0) libcurl/7.49.1 SecureTransport zlib/1.2.8
  5. OpenSSL 0.9.8zh 14 Jan 2016 built on: Jul 30 2016 platform: darwin64-x86_64-llvmHi
ozgurorman commented 7 years ago

Dear Jun,

Thank you for your reply, please find my environment below:

  1. Windows >= 8 x64 build 9200
  2. R version 3.3.2 (2016-10-31)
  3. RStudio Desktop 1.0.44
  4. curl_version $version [1] "7.50.3" $ssl_version [1] "OpenSSL/1.0.2g" $libz_version [1] "1.2.8" $libssh_version [1] "libssh2/1.7.0" $libidn_version [1] "1.32" $host [1] "x86_64-w64-mingw32"

Unfortunately the problem still persists. While trying to debug the code, I found that the handle parameter can not reach the final destination in the function callings, this is the only fact I could find.

Kind Regards, Ozgur

junos commented 7 years ago

Hi @ozgurorman,

It looks like the firewall blocked your curl request. Can you please try the following request in a command line to confirm? Please send me the response to this request.

curl -i https://www.quandl.com/api/v3/databases\?embed%5B%5D\=related_datasets\&embed%5B%5D\=vendor\&per_page\=10\&query\=oil\&type\=all

Thanks,

ozgurorman commented 7 years ago

Hi @junos,

Please find the output below, thank you for your help.


HTTP/1.1 400 Bad Request Cache-Control: no-cache Content-Type: application/json; charset=utf-8 Date: Wed, 09 Nov 2016 21:58:06 GMT Server: openresty Vary: Origin X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-Rack-CORS: preflight-hit; no-origin X-RateLimit-Limit: 50 X-RateLimit-Remaining: 43 X-Request-Id: c462d414-9d33-4ccc-ac8a-0f1851730b02 X-Runtime: 0.007340 X-XSS-Protection: 1; mode=block Content-Length: 150 Connection: keep-alive

{"quandl_error":{"code":"QECx01","message":"We could not recognize the URL you r equested: /api/v3/databases. Please check your URL and try again."}}'embed%5B% 5D\' is not recognized as an internal or external command, operable program or batch file. 'per_page\' is not recognized as an internal or external command, operable program or batch file. 'query\' is not recognized as an internal or external command, operable program or batch file. The system cannot find the path specified. Error occurred while processing: . The system cannot find the file specified. Error occurred while processing: all.


Kind Regards, Ozgur

junos commented 7 years ago

Hi @ozgurorman

Could you possible try this link in your browser https://www.quandl.com/api/v3/databases/?embed%5B%5D=related_datasets&embed%5B%5D=vendor&per_page=10&query=oil&type=all

Also try check this out as well: https://github.com/hadley/devtools/issues/1079

Thanks,

ozgurorman commented 7 years ago

Hi @junos,

I tried the link in my browser, please find the output below.

{ "databases": [ { "id": 15082, "name": "National Stock Exchange of India Prices", "database_code": "XNSE", "description": "Professional-grade EOD stock prices, dividends, adjustments and splits for all National Stock Exchange of India stocks. Updated daily. History to 2007. Data from Exchange Data International.", "datasets_count": 4600, "downloads": 6333644, "premium": true, "image": "https://quandl-data-upload.s3.amazonaws.com/uploads/source/profile_image/15082/thumb_edi.png", "favorite": false, "url_name": "National-Stock-Exchange-of-India-Prices" }, { "id": 33, "name": "National Stock Exchange of India", "database_code": "NSE", "description": "Stock and index data from the National Stock Exchange of India. ", "datasets_count": 2080, "downloads": 9977863, "premium": false, "image": "https://quandl-data-upload.s3.amazonaws.com/uploads/source/profile_image/33/thumb_nse.png", "favorite": false, "url_name": "National-Stock-Exchange-of-India" }, { "id": 13187, "name": "Toronto Ventures Stock Exchange Prices", "database_code": "XTSX", "description": "Professional-grade EOD stock prices, dividends, adjustments and splits for all Toronto Ventures Stock Exchange stocks. Updated daily. History to 2007. Data from Exchange Data International.", "datasets_count": 8080, "downloads": 12162077, "premium": true, "image": "https://quandl-data-upload.s3.amazonaws.com/uploads/source/profile_image/13187/thumb_edi.png", "favorite": false, "url_name": "Toronto-Ventures-Stock-Exchange-Prices" }, { "id": 13085, "name": "Indian Equities Adjusted End of Day Prices", "database_code": "TC1", "description": "Professionally curated EOD stock prices adjusted for cash dividends, stock dividends, stock splits, rights issues and demergers for all CNX500 index companies.", "datasets_count": 631, "downloads": 346244, "premium": true, "image": "https://quandl-data-upload.s3.amazonaws.com/uploads/source/profile_image/13085/thumb_Tricolor-data-logo-1.jpg", "favorite": false, "url_name": "Indian-Equities-Adjusted-End-of-Day-Prices" }, { "id": 13064, "name": "ORATS Option Volatility Surfaces", "database_code": "OPT", "description": "Updated daily, the ORATS professional grade database of implied and historical volatility information covers all US equity options.", "datasets_count": 5826, "downloads": 284585676, "premium": true, "image": "https://quandl-data-upload.s3.amazonaws.com/uploads/source/profile_image/13064/thumb_orats.jpg", "favorite": false, "url_name": "ORATS-Option-Volatility-Surfaces" }, { "id": 15101, "name": "NYSE MKT (AMEX) Prices", "database_code": "XASE", "description": "Professional-grade EOD stock prices, dividends, adjustments and splits for all NYSE MKT stocks. Updated daily. History to 2007. Data from Exchange Data International.", "datasets_count": 11984, "downloads": 1527384, "premium": true, "image": "https://quandl-data-upload.s3.amazonaws.com/uploads/source/profile_image/15101/thumb_edi.png", "favorite": false, "url_name": "NYSE-MKT-AMEX-Prices" }, { "id": 15066, "name": "New York Stock Exchange Prices", "database_code": "XNYS", "description": "Professional-grade EOD stock prices, dividends, adjustments and splits for all New York Stock Exchange stocks. Updated daily. History to 2007. Data from Exchange Data International.", "datasets_count": 12429, "downloads": 4246891, "premium": true, "image": "https://quandl-data-upload.s3.amazonaws.com/uploads/source/profile_image/15066/thumb_edi.png", "favorite": false, "url_name": "New-York-Stock-Exchange-Prices" }, { "id": 14999, "name": "NASDAQ Stock Market Prices", "database_code": "XNAS", "description": "Professional-grade EOD stock prices, dividends, adjustments and splits for all NASDAQ stocks. Updated daily. History to 2007. Data from Exchange Data International.", "datasets_count": 30123, "downloads": 5971549, "premium": true, "image": "https://quandl-data-upload.s3.amazonaws.com/uploads/source/profile_image/14999/thumb_edi.png", "favorite": false, "url_name": "NASDAQ-Stock-Market-Prices" }, { "id": 14005, "name": "Zacks Equity Prices", "database_code": "ZEP", "description": "Stock price history for over 28,000 active and dead tickers. Excellent source for back-testing. Covers daily close prices since 1987, volume since 1990, high and low prices since mid-1995, and open prices since mid-1999. \r\n", "datasets_count": 30660, "downloads": 103222846, "premium": true, "image": "https://quandl-data-upload.s3.amazonaws.com/uploads/source/profile_image/14005/thumb_thumb_zacks_thumb.png", "favorite": false, "url_name": "Zacks-Equity-Prices" }, { "id": 15166, "name": "National Stock Exchange", "database_code": "NSX", "description": "No description for this database yet.", "datasets_count": 4179, "downloads": 16155, "premium": false, "image": "https://d3rlqa3rnk4r1f.cloudfront.net/images/default-avatar.png", "favorite": false, "url_name": "National-Stock-Exchange" } ], "meta": { "per_page": 10, "query": "oil", "current_page": 1, "prev_page": null, "total_pages": 14, "total_count": 138, "next_page": 2, "current_first_item": 1, "current_last_item": 10 } }

Furthermore, thank you for the hadley/devtools#1079 link, I tried but unfortunately, it did not work.

Kind Regards, Ozgur

ozgurorman commented 7 years ago

Hi @junos,

I guess I found a way; I tried the method in the link you provided (https://github.com/hadley/devtools/issues/1079) again, and I instantly realized that there is a problem in openssl installation as follows: package ‘openssl’ successfully unpacked and MD5 sums checked Warning in install.packages : unable to move temporary installation ‘C:\Users\User PC\Documents\R\win-library\3.3\file39884ec623c0\openssl’ to ‘C:\Users\User PC\Documents\R\win-library\3.3\openssl’

Then I tried to install directly from the zip file by both RStudio and R and had the same problem. After all, I decided to just unzip the file and move the directory to the proper place, and finally, this solved the problem, now I have a working API.

Many thanks for your kind help.

Kind Regards, Ozgur

junos commented 7 years ago

Hi @ozgurorman

I'm glad to hear this issue is fixed, hope you enjoy using Quandl API. I will close this.

Thanks