On Thu, 10 Nov 2022, Federico Fiorani wrote:
Dear all,
I get this error "cURL error 23 (Failed writing received data to
disk/application)" when I try to open urls with GET method. Something like
this
<hansl>
open "http://www.site.com/page?p=val"
</hansl>
I see that gretl tries to save the contents of the page in a file with the
same name as the page (in the previous case "path_to_gretl_dir/page?p=val").
I suppose the problem is that in Windows "?" is a forbidden char for file
names.
Thanks, Federico. I've now added code in git to "regularize" the
string representing a downloaded resource (that is, the portion of
the URL following the rightmost "/"). The current algorithm is as
follows:
(1) Discard any leading filename-illegal characters.
(2) If the resulting string is empty, substitute "download",
otherwise proceed through the string, substituting a single
underscore, "_" for any sequence of one or more illegal characters.
Another thing, if I try to open csv-formatted file where the
separator is "|" and there is somewhere a comma "," something goes
wrong and program freezes. But about this I'm not sure if the
problem is in my pc.
I can't replicate a freeze, but I can construct a case where the
separator is "|" but "," also occurs (within double quotes), and
gretl gets confused.
"CSV", as it occurs in the wild, is kind of a non-standard: there's
really no such thing as a definitively correct reader. But here are
some relevant points:
* gretl "prefers" comma-separation, so a degree of potential
confusion is to be expected given a so-called CSV file containing
commas that are not intended as separators.
* The pipe symbol as separator is a relatively obscure choice
(although it is recognized as a possibility by gretl).
* In current git I've tried dialling down gretl's propensity to
treat comma as separator, when it seems that the commas are
occurring only within double quotes. But this will be subject to
reversion if there's any evidence that it breaks reading of "normal"
CSV files.
One further comment: a file that uses "|" for separation and ","
(unquoted) for decimal point will not be readable by gretl, and
moreover strikes me as a monstrosity. Ask Jack about that ;-)
Allin