[GNC] 回复: dit not run

Geoff cleanoutmyshed at gmail.com
Mon Mar 14 17:31:42 EDT 2022


Hi Kerwin

I am glad to hear that your previous issue has been resolved.

As I understand it, your current issue is that GnuCash cannot retrieve 
prices when you run it from the command line.

Because you have so many different versions of Perl installed on your 
computer, my conjecture is that GnuCash is picking up a different 
version of Perl than the one where you installed Finance::Quote.  This 
is why I asked you to run the SET PATH command, but you have not done this.

Also, you appear to be running Windows in a non-standard way with the 
\Program Files (x86)\ directory located on the D: drive and not the 
usual C: drive.  I am not saying that this is the cause of the problem, 
but it could be an additional factor.

Now, in your example below, you have introduced two more complications:
(1) Running GnuCash from the command line
(2) Using a GnuCash data store hosted remotely on OneDrive

There may be other explanations for your problem, and other readers on 
this list may suggest alternative solutions.

My advice is to keep it simple and go back to the basics with your 
troubleshooting:
(a) Completely remove *all* the versions of Perl on your computer
   (i) Uninstall using Windows Control Panel
   (ii) Use File Explorer to delete any remaining Perl folders
   (iii) Reboot your computer
(b) Make sure you are running the latest version of GnuCash (4.9)
(c) Install the latest version of Strawberry Perl for Windows
(d) Install the latest Finance::Quote module
(e) Test Finance::Quote from a Windows Command Prompt (not a mingw or 
any other shell) using gnc-fq-dump
(f) Use a local GnuCash data store on your C: drive.
(g) Invoke GnuCash via Windows, not the command line

Good luck!

Geoff
=====


On 14/03/2022 11:46 pm, 徐 恒晓 wrote:
> Dear Mr. Geoff ,
> 
> The previous issue has been resolved , the reason is the version of perl (activeperl or perl of msys) , I install Strawberry perl , but have another problem
> 
> kerwin at KERWIN-PC D:\Program Files (x86)\gnucash\bin
> $ perl gnc-fq-dump alphavantage CSCO
> Finance::Quote fields Gnucash uses:
>      symbol: CSCO                 <=== required
>        date: 03/11/2022           <=== recommended
>    currency: USD                  <=== required
>        last: 54.6900              <=\
>         nav:                      <=== one of these
>       price:                      <=/
>    timezone:                      <=== optional
>                                                             
> Finance::Quote is ok ,
> 
> $ gnucash-cli.exe --quotes get file://E:/onedrive/gnucash/gnucashxml/gnucash.gnucash
> 已找到 Finance::Quote 版本 1.51。
> gz_thread_func EOF
> 
> https://wiki.gnucash.org/wiki/Online_Quotes#Installing_Perl_on_Windows , I want update price .
> 
> 
> -----邮件原件-----
> 发件人: Geoff <cleanoutmyshed at gmail.com>
> 发送时间: 2022年3月14日 16:27
> 收件人: xuhengxiao at outlook.com; gnucash-user at gnucash.org
> 主题: Re: [GNC] dit not run
> 
> Hi Kerwin
> 
> You appear to have 2, or possibly 3, versions of Perl installed - is that for a specific reason?
> 
> (1) An Activestate installation - what are the contents of your perl.bat file?
> 
> (2) One or two mingw versions in slightly different locations - why?
> 
> You need to determine which version of Perl that GnuCash is seeing when it runs - from a *WINDOWS* Command prompt (not a mingw shell) type in "SET PATH"
> 
> Regards
> 
> Geoff
> =====
> 
> On 13/03/2022 12:07 pm, xuhengxiao at outlook.com wrote:
>> Dir Sir / Madam,
>>
>> Finance::Quote module is installed and working
>>
>> kerwin at KERWIN-PC D:\Program Files (x86)\gnucash\bin $ perl
>> gnc-fq-check ("1.49" "adig" "aex" "aiahk" "alphavantage" "amfiindia"
>> "asegr" "asx" "aufunds" "australia" "bamosz" "bet" "bmonesbittburns"
>> "bourso" "bse" "bsero" "canada" "canadamutual" "citywire" "cominvest"
>> "cse" "deka" "dutch" "dwsfunds" "europe" "fetch_live_currencies"
>> "fidelity" "fidelity_direct" "fidelityfixed" "financecanada"
>> "finanzpartner" "finland" "fool" "france" "ftfunds" "ftportfolios"
>> "ftportfolios_direct" "fundlibrary" "goldmoney" "greece" "hex" "hu"
>> "hufund" "hungary" "hustock" "iexcloud" "indiamutual"
>> "known_currencies" "lerevenu" "maninv" "morningstar" "morningstarau"
>> "morningstarch" "morningstarjp" "mstaruk" "nasdaq" "nyse" "nz" "nzx"
>> "platinum" "romania" "seb_funds" "sixfunds" "sixshares"
>> "stockhousecanada_fund" "tdefunds" "tdwaterhouse" "tiaacref" "tnetuk"
>> "troweprice" "troweprice_direct" "trustnet" "tsp" "tsx"
>> "uk_unit_trusts" "ukfunds" "unionfunds" "usa" "usfedbonds" "vanguard"
>> "vwd" "yahoo_json" "yahoo_yql" "za" "za_unittrusts")
>>
>> kerwin at KERWIN-PC D:\Program Files (x86)\gnucash\bin $ where perl
>> C:\Users\kerwin\AppData\Local\activestate\cache\bin\perl.bat
>> D:\msys64\mingw64\bin\perl.exe
>> D:\msys64\usr\bin\perl.exe
>>
>> perl gnc-fq-dump -v alphavantage 600725.
>> nance::Quote fields Gnucash uses:
>> symbol: 600725.SS <=== requ
>> date: 03/11/2022 <=== reco
>> currency: CNY <=== requ
>> last: 3.8400 <=\
>> nav: <=== one
>> price: <=/
>> timezone: <=== opti
>> l fields returned by Finance::Quote for ock field value
>> ________________________________ 0725.SS close: 3.8400 0725.SS
>> currency: CNY 0725.SS currency_set_by_fq: 1 0725.SS date: 03/11/2022
>> 0725.SS high: 3.9800 0725.SS isodate: 2022-03-11 0725.SS last: 3.8400
>> 0725.SS low: 3.7600 0725.SS method: alphavantage 0725.SS open: 3.9800
>> 0725.SS success: 1 0725.SS symbol: 600725.SS 0725.SS volume: 52256390
>>
>> But gnucash did not run , it always check Finance::Quote .
>>
>> [cid:image001.png at 01D836B9.B832B450]
>>
>> Thanks & Best Regards / kerwin
>>
>>
>> _______________________________________________
>> gnucash-user mailing list
>> gnucash-user at gnucash.org
>> To update your subscription preferences or to unsubscribe:
>> https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
>> s.gnucash.org%2Fmailman%2Flistinfo%2Fgnucash-user&data=04%7C01%7C%
>> 7C6f4a088eaafa45e8911908da05946393%7C84df9e7fe9f640afb435aaaaaaaaaaaa%
>> 7C1%7C0%7C637828432128336811%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
>> DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=U3C
>> G8mG%2FDD6FkmpWOcJ8qLx65UR4KFQeD7kaKPLkrNQ%3D&reserved=0
>> If you are using Nabble or Gmane, please see https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.gnucash.org%2Fwiki%2FMailing_Lists&data=04%7C01%7C%7C6f4a088eaafa45e8911908da05946393%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637828432128336811%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=JPepCtZ0Qna3SSL1JBnT9OhQiQIplXSGEojY30soC%2Bs%3D&reserved=0 for more information.
>> -----
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.


More information about the gnucash-user mailing list