webread( ) producing nothing but errors

I have some code that I have used previously to pull data from a google sheet using webread( ). However, recently, webread stopped working and began returning an error message stating
Error using webread (line 122)
Unsupported input: string
This has nothing to do with the google sheets. I get the same error when trying to run the command
webread('https://www.mathworks.com')
The error persists when I change networks, so it's not a network admin issue. It also occurs across both of my computers (different operating systems) running 2021a.
Is this a known bug? Am I missing something obvious?

10 Comments

What shows up for
which -all webread
Also is there anything more to the error message?
It is probably something inside toolbox/matlab/external/interfaces/webservices/restful/private/openHTTPConnection.m but I don't know what
which -all webread
produces an output of:
C:\Program Files\MATLAB\R2021a\toolbox\matlab\external\interfaces\webservices\restful\webread.m
Generally, the error I reported is the only one I see. Sometimes the line varies between 119 and 122, depending upon the URL. The one exception is the first time I try calling webread() after starting Matlab, where I get a few more outputs.
Error using webread (line 122)
Unsupported input: string
Error using weboptions (line 378)
Unsupported input: string
Error in matlab.internal.doc.updateConnectorDocroot (line 3)
options = weboptions('RequestMethod','post', ...
I should mention that 2021a has been giving me all sorts of weird errors on every computer I've installed it on, especially for functionality that requires network access. Clicking 'get more apps' or 'get add-ons' from the main ribbon or running 'doc <any function>' from the command line produces a cascade of errors in matlab.net.URL, getExplorerURL, etc...
"I should mention that 2021a has been giving me all sorts of weird errors on every computer I've installed it on"
Start at this important point. Do not trust an installation, which shows "weird messages". Uninstall the current Matlab version and download the installation files again.
I have done so, and this isn't an isolated issue. I've had the same problem with 2021a and 2021b on four different computers, so I'm quite convinced that the issue is systemic.
This is really strange. You can be sure, that this does not happen for all installations of Matlab. Contact thesales team to discuss this. As long as the installation does not work relaibly, Matlab does not run reliably.
Actually, I figured it out.
It wasn't an installation issue, per se, but a "me" issue.
I've got a set of third-party / custom functions that I copy to any PC on which I install Matlab. It looks like one of these FEX downloads included a duplicate function for strjoin( ) that slipped my notice. It was being called in lieu of the built-in function and producing an error.
Jan
Jan on 8 Mar 2022
Edited: Jan on 2 Sep 2022
Fine! Remember to append folder containing user-defined functions at the bottom of the path, not on top. Then such shaddowing does at least not destroy builtin functions.
You can use this tool to detect overlapping functions: FEX: UniqueFuncNames
Thanks for this thread everyone. Same exact thing happened to me and the thread helped me find the problem.
@John Mickett: Ther OP did not tell us, what the problem was. It would be very useful for other readers if you mention the cause of the problems on your computer.

Sign in to comment.

Answers (0)

Categories

Products

Asked:

on 8 Mar 2022

Commented:

Jan
on 2 Sep 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!