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

What shows up for
which -all webread
Also is there anything more to the error message?
Walter Roberson
Walter Roberson 2022년 3월 8일
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...
Jan
Jan 2022년 3월 8일
"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.
Casey Harwood
Casey Harwood 2022년 3월 8일
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.
Jan
Jan 2022년 3월 8일
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.
Casey Harwood
Casey Harwood 2022년 3월 8일
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 2022년 3월 8일
편집: Jan 2022년 9월 2일
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
John Mickett
John Mickett 2022년 9월 1일
Thanks for this thread everyone. Same exact thing happened to me and the thread helped me find the problem.
Jan
Jan 2022년 9월 2일
@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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Install Products에 대해 자세히 알아보기

제품

질문:

2022년 3월 8일

댓글:

Jan
2022년 9월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by