forio / Curl.jl

a Julia HTTP curl library
Other
11 stars 8 forks source link

WARNING: Curl.jl has been deprecated. m ERROR: error compiling get:... #13

Open paulanalyst opened 9 years ago

paulanalyst commented 9 years ago
           _

() | A fresh approach to technical computing () | () () | Documentation: http://docs.julialang.org | | | Type "help()" for help. | | | | | | |/ ` | | | | || | | | (| | | Version 0.4.0-dev+2847 (2015-01-21 18:34 UTC) / |_'||_|'_| | Commit fc61385 (28 days old master) |__/ | x86_64-w64-mingw32

julia> Pkg.update() INFO: Updating METADATA... INFO: Updating cache of StatsBase... INFO: Updating LinearAlgebra... INFO: Computing changes... INFO: Upgrading StatsBase: v0.6.11 => v0.6.12

julia> Pkg.add("Curl") INFO: Cloning cache of Curl from git://github.com/forio/Curl.jl.git INFO: Installing Curl v0.0.3 INFO: Package database updated

julia> using Curl

WARNING: deprecated syntax "{a=>b, ...}" at C:\Users\SAMSUNG2.julia\v0.4\Curl\src\Curl.jl:15. Use "Dict{Any,Any}(a=>b, ...)" instead.

WARNING: deprecated syntax "{a=>b, ...}" at C:\Users\SAMSUNG2.julia\v0.4\Curl\src\Curl.jl:113. Use "Dict{Any,Any}(a=>b, ...)" instead. WARNING: Curl.jl has been deprecated. Please check out Requests.jl (http://github.com/loladiro/Requests.jl) for al l your HTTP client needs.

julia> using JSON

julia> Curl.get("http://jsonip.com").text ERROR: error compiling get: error compiling setup_curl: error compiling curl_version: could not load module libcur l: no error

julia>

WestleyArgentum commented 9 years ago

From your output I believe you're running on windows? It looks as though you don't have libcurl installed somewhere in the path.

I really suggest you try using http://github.com/loladiro/Requests.jl instead though! Or, failing that, you can also access curl through https://github.com/JuliaWeb/HTTPClient.jl

paulanalyst commented 9 years ago

I have Libcurl :/ waht I can do more? Still ERROR: error compiling setup_curl: error compiling curl_version: could not load module libcurl: no error in get at C:\Users\SAMSUNG2.julia\v0.3\Curl\src\Curl.jl:141

() | A fresh approach to technical computing () | () () | Documentation: http://docs.julialang.org | | | Type "help()" for help. | | | | | | |/ ` | | | | || | | | (| | | Version 0.3.6 (2015-02-17 22:12 UTC) / |_'||_|'_| | Official http://julialang.org/ release |__/ | x86_64-w64-mingw32

julia> using Curl ERROR: Curl not found in require at loading.jl:47

julia> Pkg.update(); Pkg.add("Curl"); using Curl INFO: Updating METADATA... INFO: Computing changes... INFO: No packages to install, update or remove INFO: Cloning cache of Curl from git://github.com/forio/Curl.jl.git INFO: Installing Curl v0.0.3 INFO: Package database updated WARNING: Curl.jl has been deprecated. Please check out Requests.jl (http://github.com/loladiro/Requests.jl) for al l your HTTP client needs.

julia> Pkg.rm("Requsts") INFO: Nothing to be done

julia> Pkg.rm("Requests") INFO: Removing Codecs v0.1.3 INFO: Removing JSON v0.4.1 INFO: Removing Requests v0.0.8 INFO: Package database updated

julia> Pkg.update(); Pkg.add("Curl"); using Curl INFO: Updating METADATA... INFO: Computing changes... INFO: No packages to install, update or remove INFO: Nothing to be done

julia> Curl.get("http://jsonip.com").text ERROR: error compiling get: error compiling setup_curl: error compiling curl_version: could not load module libcur l: no error

julia> Pkg.installed() Dict{ASCIIString,VersionNumber} with 31 entries: "Meddle" => v"0.0.6" "LibExpat" => v"0.0.6" "FactCheck" => v"0.2.5" "SortingAlgorithms" => v"0.0.3" "ZipFile" => v"0.2.3" "GnuTLS" => v"0.0.3" "WinRPM" => v"0.1.6" "Curl" => v"0.0.3" "SHA" => v"0.0.3" "Gumbo" => v"0.1.2" "Docile" => v"0.4.5" "IPNets" => v"0.1.3" "ArrayViews" => v"0.4.8" "LibCURL" => v"0.1.4" "StatsBase" => v"0.6.12" "DataArrays" => v"0.2.11" "Compat" => v"0.2.12" "GeoIP" => v"0.2.0+" "GZip" => v"0.2.13" "HTTPClient" => v"0.1.4" "Dates" => v"0.3.2" "HttpServer" => v"0.0.11" "BinDeps" => v"0.3.7" "Zlib" => v"0.1.7" "HttpParser" => v"0.0.10" "HttpCommon" => v"0.0.12" "DataFrames" => v"0.6.1" "URLParse" => v"0.0.0" "Reexport" => v"0.0.2" "Nettle" => v"0.1.8" "URIParser" => v"0.0.4"

julia> Pkg.rm("Curl") INFO: Removing Curl v0.0.3 INFO: Package database updated

julia> Pkg.installed() Dict{ASCIIString,VersionNumber} with 30 entries: "Meddle" => v"0.0.6" "LibExpat" => v"0.0.6" "FactCheck" => v"0.2.5" "SortingAlgorithms" => v"0.0.3" "ZipFile" => v"0.2.3" "GnuTLS" => v"0.0.3" "WinRPM" => v"0.1.6" "SHA" => v"0.0.3" "Gumbo" => v"0.1.2" "Docile" => v"0.4.5" "IPNets" => v"0.1.3" "ArrayViews" => v"0.4.8" "LibCURL" => v"0.1.4" "StatsBase" => v"0.6.12" "DataArrays" => v"0.2.11" "Compat" => v"0.2.12" "GeoIP" => v"0.2.0+" "GZip" => v"0.2.13" "HTTPClient" => v"0.1.4" "Dates" => v"0.3.2" "HttpServer" => v"0.0.11" "BinDeps" => v"0.3.7" "Zlib" => v"0.1.7" "HttpParser" => v"0.0.10" "HttpCommon" => v"0.0.12" "DataFrames" => v"0.6.1" "URLParse" => v"0.0.0" "Reexport" => v"0.0.2" "Nettle" => v"0.1.8" "URIParser" => v"0.0.4"

julia> Pkg.update() INFO: Updating METADATA... INFO: Computing changes... INFO: No packages to install, update or remove

julia> Pkg.add("Curl") INFO: Installing Curl v0.0.3 INFO: Package database updated

julia> using Curl

julia> Curl.get("http://jsonip.com").text ERROR: error compiling setup_curl: error compiling curl_version: could not load module libcurl: no error in get at C:\Users\SAMSUNG2.julia\v0.3\Curl\src\Curl.jl:141

julia> Curl.get("http://jsonip.com") ERROR: error compiling setup_curl: error compiling curl_version: could not load module libcurl: no error in get at C:\Users\SAMSUNG2.julia\v0.3\Curl\src\Curl.jl:141

julia> Curl.get("http://wp.pl") ERROR: error compiling setup_curl: error compiling curl_version: could not load module libcurl: no error in get at C:\Users\SAMSUNG2.julia\v0.3\Curl\src\Curl.jl:141

julia> Pkg.clone("Curl") INFO: Cloning Curl from git://github.com/forio/Curl.jl.git ERROR: Curl already exists in clone at pkg/entry.jl:148 in clone at pkg/entry.jl:175 in anonymous at pkg/dir.jl:28 in cd at file.jl:30 in cd at pkg/dir.jl:28 in clone at pkg.jl:30

julia> Pkg.rm("Curl") INFO: Removing Curl v0.0.3 INFO: Package database updated

julia> Pkg.clone("Curl") INFO: Cloning Curl from git://github.com/forio/Curl.jl.git INFO: Computing changes... INFO: No packages to install, update or remove INFO: Package database updated

julia> using Curl

julia> Curl.get("http://jsonip.com") ERROR: error compiling setup_curl: error compiling curl_version: could not load module libcurl: no error in get at C:\Users\SAMSUNG2.julia\v0.3\Curl\src\Curl.jl:141

julia>

WestleyArgentum commented 9 years ago
julia> Pkg.add("Requests")
...

julia> using Requests

julia> using JSON

julia> JSON.parse(get("http://jsonip.com").data)
Dict{String,Any} with 3 entries:
  "about" => "/about"
  "ip"    => "74.88.33.99"
  "Pro!"  => "http://getjsonip.com"
paulanalyst commented 9 years ago

:/ ERROR: Unknown value

julia> JSON.parse(get("http://jsonip.com").data) Dict{AbstractString,Any} with 3 entries: "about" => "/about" "ip" => "89.76.82.97" "Pro!" => "http://getjsonip.com"

julia> JSON.parse(get("http://softstat.pl").data) ERROR: Unknown value Line: 0 Around: ...<!DOCTYPE html> <htm... ^

in error at error.jl:19

julia>

paulanalyst commented 9 years ago

^ Indicates: <!