HTTP.request closewrite

Hi,

I have an application that makes hundreds of HTTP requests every day for the last 12 months. Today, after upgrading to 1.8.0 I have different behavior that results in a fail.

This code is in a loop that call it hundreds of time with slightly different parameters.

RequestString = "https://www.asx.com.au/asx/1/share/BHP/prices?interval=daily&count=100"
r = HTTP.request("GET", RequestString;verbose=0,status_exception=false)
I make this call a few hundred times and the first time I make the above request it seems to work ok but I get

WARNING: both IOExtras and Base export "closewrite"; uses of it in module StreamRequest must be qualified
WARNING: both IOExtras and Base export "closewrite"; uses of it in module ConnectionPool must be qualified

the second time I make the call I get …
ERROR: UndefVarError: closewrite not defined

The stack trace is big but buried in there is a reference to caused by: EOFError: read end of file.

So it looks like I’m not using this call correctly. Can anyone see what I might be doing wrong?

Thanks
Steve

Hmmm, have you updated HTTP.jl? The latest version is 1.3.3 or something around there.

I had not, it was ⌅ [cd3eb016] HTTP v0.8.19

I tried to update the package using update HTTP and apart from reporting a warning about the manifest file format there were no changes. status still reports the same version. But I can see the latest version is git is 1.3.3.

status --outdated reports
⌅ [cd3eb016] HTTP v0.8.19 (<v1.3.3): AlphaVantage, DataDeps, GR, JuliaWebAPI, MarketData, Mux, OpenIDConnect, Temporal, WebSockets

I’m really out of my depth here. Do I need to update my Manifest file format?

Steve

The outdated Manifest warning is usually benign. The report there though tells you the packages “holding you back” from being able to upgrade HTTP.jl. I’ve been trying to go around and update a bunch (for example, Mux.jl is now HTTP.jl 1.0-compatible), but it looks like there are still more to go.

Thanks, that helps my understanding. I will remove what I don’t currently need and update what I can and then update HTTP.

Do you have any idea what do do to solve this? ie, remove from manifest. Can I edit it directly?

(shares) pkg> remove DataDeps
ERROR: The following package names could not be resolved:
 * DataDeps (124859b0-ceae-595e-8997-d05f6a7a8dfe in manifest but not in project)```

That usually means that DataDeps is not a direct dependency of your project, so you can’t directly remove it. You’ll have to figure out which of the packages in your Project.toml depends on DataDeps and see whether you can remove that.

You can remove/update the other ones and see if DataDeps is still a problem at that point. If it is, you’ll have to check your Manifest.toml file to see which package has DataDeps as part of its deps.

1 Like

Thanks very much for all your help here. I think I now understand dependencies a lot better because of your suggestions. In the end it was Indicators.jl that was preventing HTTP from updating so I just wont use it.

Regards
Steve

1 Like