Re: [GNC] Finance::Quote on a Mac with a foreign perl

2024-04-25 Thread Vincent Lucarelli
John,

I run macOS and use Homebrew. How are the user’s running gnc-fq-update? From a 
terminal, if you 

> cd /Applications/Gnucash.app/Contents/Resources/bin
> sudo ./gnc-fq-update

it is going to use /usr/bin/perl from the #! line at the top of the script.

But the script uses the perl CPAN module, so maybe there is something in 
$HOME/.cpan that is causing trouble?

To answer your actual question, I have

> /usr/bin/perl -e 'print(join("\n", @INC));'
/Library/Perl/5.34/darwin-thread-multi-2level
/Library/Perl/5.34
/Network/Library/Perl/5.34/darwin-thread-multi-2level
/Network/Library/Perl/5.34
/Library/Perl/Updates/5.34.1
/System/Library/Perl/5.34/darwin-thread-multi-2level
/System/Library/Perl/5.34
/System/Library/Perl/Extras/5.34/darwin-thread-multi-2level
/System/Library/Perl/Extras/5.34

vs 

> which perl
/Users/acount/perl5/perlbrew/perls/perl-5.32.0/bin/perl

> perl -e 'print(join("\n", @INC));'
/Users/acount/perl5/perlbrew/perls/perl-5.32.0/lib/site_perl/5.32.0/darwin-2level
/Users/acount/perl5/perlbrew/perls/perl-5.32.0/lib/site_perl/5.32.0
/Users/acount/perl5/perlbrew/perls/perl-5.32.0/lib/5.32.0/darwin-2level
/Users/acount/perl5/perlbrew/perls/perl-5.32.0/lib/5.32.0

but - I’m not sure if there are other shell rc file changes that these users 
might have that could alter this, or if there are brew installs that could 
alter this as well.

I’m happy to help sort this out, but need some more information about the 
users’ issues.

Best,

Vince


> On Apr 25, 2024, at 7:15 PM, john  wrote:
> 
> Are there any Mac users who have Homebrew installed and know what @INC is?
> 
> At least two users with the first problem but without knowing the second have 
> gotten themselves cross-threaded trying to install Finance::Quote because 
> Homebrew' screws up their perl installation so that cpan ignores the 
> installed modules and since Homebrew doesn't (at least without help) provide 
> SSLeay, Net::HTTPS, and IO::Sockets::SSL and macOS doesn't put OpenSSL's 
> headers in /usr/include they have to perform all sorts of unnatural acts to 
> get gnc-fq-update to work.
> 
> We need some simple instructions for the wiki for how to work around the 
> problem so that gnc-fq-update uses the system perl (that's after all the only 
> one the app bundle can see, it doesn't read the user's shell environment) and 
> gets the dependencies from /System/Library/Perl instead of trying to build 
> them.
> 
> Regards,
> John Ralls
> 
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] macOS Sonoma "Gnucash is damaged and can’t be opened" error

2023-10-13 Thread Vincent Lucarelli
Hi Richard,

I’m running Gnucash on an older Mac that has an Intel processor.  I haven’t 
upgraded my M1 laptop to Sonoma yet, but I can try downloading and launch 
Gnucash on it when I do upgrade to see if I see the same behavior.

Vince

> On Oct 11, 2023, at 11:08 AM, R Losey  wrote:
> 
> 
> 
> On Tue, Oct 10, 2023 at 9:11 PM Vincent Lucarelli 
> mailto:vincent.lucare...@gmail.com>> wrote:
>> Hi,
>> 
>> I upgraded an Intel Mac to macOS Sonoma and downloaded Gnucash 5.4.  When I 
>> tried to run it, I got the error "Gnucash is damaged and can’t be opened.”
>> 
>> In previous OS versions, there was an error about untrusted developer and in 
>> System Settings you could approve running the application. System Settings 
>> has been reorganized and I could not find anywhere to approve Gnucash.
>> 
>> In the terminal, I ran
>> 
>>   xattr -rds com.apple.quarantine /Applications/Gnucash.app
>> 
>> and then has to launch Gnucash twice for it to finally run.
> 
>  
> I thought that  for an M1 or M2 Mac, you need to have the Rosetta app to 
> allow Intel-based applications to run (such as GnuCash). Do you have that 
> installed?
> 
> I've never had any problems running GnuCash on my M1 iMac, but I'm still 
> running Ventura.
> 
> -- 
> _
> Richard Losey
> rlo...@gmail.com <mailto:rlo...@gmail.com>
> Micah 6:8

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] macOS Sonoma "Gnucash is damaged and can’t be opened" error

2023-10-11 Thread Vincent Lucarelli
I downloaded the image directly from the link on the gnucash.org 
<http://gnucash.org/> homepage.

I did try to run the fq updater from the command line before double clicking 
the Gnucash.app - could that have caused the whole app to be marked with 
quarantine?

Vince

> On Oct 10, 2023, at 11:01 PM, john  wrote:
> 
> 
> 
>> On Oct 10, 2023, at 05:05, Vincent Lucarelli  
>> wrote:
>> 
>> Hi,
>> 
>> I upgraded an Intel Mac to macOS Sonoma and downloaded Gnucash 5.4.  When I 
>> tried to run it, I got the error "Gnucash is damaged and can’t be opened.”
>> 
>> In previous OS versions, there was an error about untrusted developer and in 
>> System Settings you could approve running the application. System Settings 
>> has been reorganized and I could not find anywhere to approve Gnucash.
>> 
>> In the terminal, I ran
>> 
>> xattr -rds com.apple.quarantine /Applications/Gnucash.app
>> 
>> and then has to launch Gnucash twice for it to finally run.
> 
> That's interesting: If you're getting GnuCash.app from us you shouldn't be 
> getting untrusted developer warnings: It's signed with an Apple developer 
> certificate and notarized by their automated checking system. Homebrew just 
> "bottles" our dmg, so there shouldn't be any problem if you go that route 
> either.
> 
> Regards,
> John Ralls

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] macOS Sonoma "Gnucash is damaged and can’t be opened" error

2023-10-10 Thread Vincent Lucarelli
Hi,

I upgraded an Intel Mac to macOS Sonoma and downloaded Gnucash 5.4.  When I 
tried to run it, I got the error "Gnucash is damaged and can’t be opened.”

In previous OS versions, there was an error about untrusted developer and in 
System Settings you could approve running the application. System Settings has 
been reorganized and I could not find anywhere to approve Gnucash.

In the terminal, I ran

  xattr -rds com.apple.quarantine /Applications/Gnucash.app

and then has to launch Gnucash twice for it to finally run.

Vince
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] [Finance-quote-news] Finance-Quote 1.56 released!

2023-05-31 Thread Vincent Lucarelli
This error is rooted in needing an AlphaVantage API key for any FQ fetch 
because that’s the default Currency module and the code is setup to ensure we 
can do a currency conversion if needed.

You can verify that by setting the environment variable DEBUG=1 and repeating 
the gnucash-cli command.  You should see the AlphaVantage key error.

I don’t think we’ve clearly documented this requirement anywhere and maybe we 
should change the code to error out only if currency conversion is actually 
necessary and the Currency module API key isn’t set.  We can move this part of 
the discussion to our GitHub project.

Best,

Vince

> On May 30, 2023, at 11:25 AM, Bruce Schuck  wrote:
> 
> On 5/30/23 7:59 AM, Fross, Michael wrote:
> 
>> Running directly via the rest api works:
>> https://api.twelvedata.com/quote?symbol=acn=xx 
>>  
>> (I've hidden the actual key)
> 
>> But when I run:
>> 
>> C:\Program Files (x86)\gnucash\bin>gnucash-cli.exe --verbose --extra -Q dump 
>> twelvedata aapl
>> Finance::Quote reported a failure for symbol aapl: TwevleData return and 
>> unexpected json result
> 
>> I have the environment variable set:
>> C:\>echo %TWELVEDATA_API_KEY
>> xx  (I've hidden the actual key)
> 
>> Something seems off and it's probably on my part.
> 
> Michael,
> 
> I am not sure if it is on your end. Please open an issue on 
> https://github.com/finance-quote/finance-quote/issues.
> 
> Vincent, you just contributed this mmodule, could you please look at this?
> 
> Thank you.
> 
> Bruce S

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Debug information to sort out Finance::Quote issue on macOS Ventura

2022-12-18 Thread Vincent Lucarelli
John,

I opened an F::Q issue 
https://github.com/finance-quote/finance-quote/issues/254 to discuss with Bruce 
how to implement the enumeration in F::Q of modules with an API key.  If you 
have time, please comment on any changes to the preliminary idea I outlined to 
make the feature work best for GnuCash.

I didn’t know how to find the command line options for logging and will try 
your suggestion.

Thanks,

Vince

> On Dec 16, 2022, at 4:25 PM, John Ralls  wrote:
> 
> Vince,
> 
> Dtruss probably tells you a lot of stuff you don't need and not much that you 
> do. Did you try `gnucash --log gnc.scm=debug --logto=stderr`?
> 
> Yes, GnuCash 5 will continue to use F::Q. Geert and I rewrote the original 
> Scheme bridge in C++ and greatly improved the error capture and reporting in 
> the process. We're still using the legacy methods so I guess some more work 
> is in order.
> 
> In order for GnuCash to support passing api keys as source module parameters 
> we need a Quote.pm function to enumerate the source modules that need an API 
> key. The alternative of hard-coding the modules in GnuCash is too brittle 
> because the module names sometimes change. That brittleness is evident in the 
> Security Editor where we still list a bunch of modules that no longer exist 
> and there are a bunch of new modules at the bottom.
> 
> Regards,
> John Ralls
> 
>> On 16. Dec 2022, at 11:52, Vincent Lucarelli  
>> wrote:
>> 
>> Thanks John, I did in fact forget to replace the environment.local file 
>> after a fresh GnuCash install, but still no luck.
>> 
>> I’m trying to sort through dtruss output, but it is a bit difficult to sort 
>> out what is going wrong. Happy to receive additional suggestions.
>> 
>> 
>> For the API keys, I wrote several of the new F::Q modules and choose not to 
>> support environment variables because it seemed like more services were 
>> going to require API keys and the number of environment variables would 
>> grow.  So the only mechanism right now is to set the API key when 
>> instantiating an F::Q object.
>> 
>> I saw that you commented one F::Q/issue/200 and indicated a new major 
>> release of GnuCash is in the works.  Is F::Q going to continue to be the 
>> source for quotes in that version?  Is so, I think there are at least two 
>> options for dealing with API keys - F::Q adds environment variables for 
>> every module that needs one and then GnuCash either continues to use 
>> something like the environment file or adds a preference where users can 
>> register environment variables, or, GnuCash adds a preference for 
>> registering API keys and those get routed to wherever the F::Q instance is 
>> created.
>> 
>> The environment variables seem to cause users headaches to make sure they 
>> are set properly and survive GnuCash upgrades, but a separate GnuCash 
>> preference set of key/values for F::Q API keys is a lot more work for the 
>> GnuCash developers.  I haven’t been active on F::Q development, but if there 
>> are changes that will help with the next GnuCash release, I’ll find time to 
>> help.
>> 
>> Best,
>> 
>> Vince
>> 
>> 
>> 
>> 
>> 
>>> On Dec 16, 2022, at 12:31 PM, john  wrote:
>>> 
>>>> On Dec 15, 2022, at 4:37 PM, Vincent Lucarelli 
>>>>  wrote:
>>>> 
>>>> Hi,
>>>> 
>>>> I upgraded to macOS Ventura and am having trouble getting Finance::Quote 
>>>> to work.
>>>> 
>>>> gnc-fq-dump is working in the terminal (see shell output below), but in 
>>>> GnuCash I get the error “There was a system error while retrieving the 
>>>> price quotes.”
>>>> 
>>>> Is there some way to get debugging output from the GnuCash app so I can 
>>>> see what call is being made and what error is occurring?
>>> 
>>> If you're trying to use iexcloud in GnuCash and you have an Intel mac then 
>>> the problem is most likely that iexcloud key. GnuCash doesn't read the 
>>> environment set in the shell's .*profile so you'll have to add it as an 
>>> environment variable to the environment file, see 
>>> https://wiki.gnucash.org/wiki/Configuration_Locations#File_environment.local.
>>> 
>>> There's another problem with newer F::Q modules requiring an api key: Many 
>>> of them don't have an associated environment variable and expect the 
>>> api_key to be passed as a parameter and Finance::Quote doesn't expose any 
>>> way to discover whether a module requires a key making it rather difficult 
>>> for GnuCash to support them.
>>> 
>>> Regards,
>>> John Ralls
>> 
> 

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Debug information to sort out Finance::Quote issue on macOS Ventura

2022-12-18 Thread Vincent Lucarelli
Hi Richard,

I’m running GnuCash on a Retina 5K, 27-inch, 2019 with an 3.7 GHz 6-Core Intel 
Core i5 and Ventura 13.0.1.  I have an M1 MacBook, but don’t run GnuCash there.

I didn’t follow the development of Ventura closely, so I don’t know when Apple 
changed course, but there are a few Intel models still supported 
(https://support.apple.com/en-us/HT213264).

Best,

Vince

> On Dec 16, 2022, at 2:18 PM, R Losey  wrote:
> 
> I'm pretty sure that Ventura does not work on Intel Macs... I suspect that 
> Vincent has an M1 or M2 Mac.
> 
> 
> On Fri, Dec 16, 2022 at 11:32 AM john  <mailto:jra...@ceridwen.us>> wrote:
>> > On Dec 15, 2022, at 4:37 PM, Vincent Lucarelli 
>> > mailto:vincent.lucare...@gmail.com>> wrote:
>> > 
>> > Hi,
>> > 
>> > I upgraded to macOS Ventura and am having trouble getting Finance::Quote 
>> > to work.
>> > 
>> > gnc-fq-dump is working in the terminal (see shell output below), but in 
>> > GnuCash I get the error “There was a system error while retrieving the 
>> > price quotes.”
>> > 
>> > Is there some way to get debugging output from the GnuCash app so I can 
>> > see what call is being made and what error is occurring?
>> 
>> If you're trying to use iexcloud in GnuCash and you have an Intel mac then 
>> the problem is most likely that iexcloud key. GnuCash doesn't read the 
>> environment set in the shell's .*profile so you'll have to add it as an 
>> environment variable to the environment file, see 
>> https://wiki.gnucash.org/wiki/Configuration_Locations#File_environment.local.
>> 
>> There's another problem with newer F::Q modules requiring an api key: Many 
>> of them don't have an associated environment variable and expect the api_key 
>> to be passed as a parameter and Finance::Quote doesn't expose any way to 
>> discover whether a module requires a key making it rather difficult for 
>> GnuCash to support them.
>> 
>> Regards,
>> John Ralls
>> ___
>> gnucash-user mailing list
>> gnucash-user@gnucash.org <mailto:gnucash-user@gnucash.org>
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> -
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
> 
> 
> -- 
> _
> Richard Losey
> rlo...@gmail.com <mailto:rlo...@gmail.com>
> Micah 6:8

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Debug information to sort out Finance::Quote issue on macOS Ventura

2022-12-18 Thread Vincent Lucarelli
Thanks John, I did in fact forget to replace the environment.local file after a 
fresh GnuCash install, but still no luck.

I’m trying to sort through dtruss output, but it is a bit difficult to sort out 
what is going wrong. Happy to receive additional suggestions.


For the API keys, I wrote several of the new F::Q modules and choose not to 
support environment variables because it seemed like more services were going 
to require API keys and the number of environment variables would grow.  So the 
only mechanism right now is to set the API key when instantiating an F::Q 
object.

I saw that you commented one F::Q/issue/200 and indicated a new major release 
of GnuCash is in the works.  Is F::Q going to continue to be the source for 
quotes in that version?  Is so, I think there are at least two options for 
dealing with API keys - F::Q adds environment variables for every module that 
needs one and then GnuCash either continues to use something like the 
environment file or adds a preference where users can register environment 
variables, or, GnuCash adds a preference for registering API keys and those get 
routed to wherever the F::Q instance is created.

The environment variables seem to cause users headaches to make sure they are 
set properly and survive GnuCash upgrades, but a separate GnuCash preference 
set of key/values for F::Q API keys is a lot more work for the GnuCash 
developers.  I haven’t been active on F::Q development, but if there are 
changes that will help with the next GnuCash release, I’ll find time to help.

Best,

Vince





> On Dec 16, 2022, at 12:31 PM, john  wrote:
> 
>> On Dec 15, 2022, at 4:37 PM, Vincent Lucarelli  
>> wrote:
>> 
>> Hi,
>> 
>> I upgraded to macOS Ventura and am having trouble getting Finance::Quote to 
>> work.
>> 
>> gnc-fq-dump is working in the terminal (see shell output below), but in 
>> GnuCash I get the error “There was a system error while retrieving the price 
>> quotes.”
>> 
>> Is there some way to get debugging output from the GnuCash app so I can see 
>> what call is being made and what error is occurring?
> 
> If you're trying to use iexcloud in GnuCash and you have an Intel mac then 
> the problem is most likely that iexcloud key. GnuCash doesn't read the 
> environment set in the shell's .*profile so you'll have to add it as an 
> environment variable to the environment file, see 
> https://wiki.gnucash.org/wiki/Configuration_Locations#File_environment.local.
> 
> There's another problem with newer F::Q modules requiring an api key: Many of 
> them don't have an associated environment variable and expect the api_key to 
> be passed as a parameter and Finance::Quote doesn't expose any way to 
> discover whether a module requires a key making it rather difficult for 
> GnuCash to support them.
> 
> Regards,
> John Ralls

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Debug information to sort out Finance::Quote issue on macOS Ventura

2022-12-16 Thread Vincent Lucarelli
Hi,

I upgraded to macOS Ventura and am having trouble getting Finance::Quote to 
work.

gnc-fq-dump is working in the terminal (see shell output below), but in GnuCash 
I get the error “There was a system error while retrieving the price quotes.”

Is there some way to get debugging output from the GnuCash app so I can see 
what call is being made and what error is occurring?

Thanks,

Vince


Terminal Transcript

% which perl
/usr/bin/perl
% pwd   
 
/Applications/Gnucash.app/Contents/Resources/bin
% IEXCLOUD_API_KEY=pk_redacted... DEBUG=1 ./gnc-fq-dump -v iexcloud AAPL

### AlphaVantage->new args : {}

### store_date symbol: 'AAPL'
### store_date pieces: {
###  isodate => '2022-12-15'
###}
isodate 2022-12-15 -> Day 15, Month 12, Year 2022

### format: 1
Final Year-Month-Day -> 2022-12-15

### format: 1
Finance::Quote fields Gnucash uses:
symbol: AAPL <=== required
  date: 12/15/2022   <=== recommended
  currency: USD  <=== required
  last: 136.61   <=\
   nav:  <=== one of these
 price:  <=/
  timezone:  <=== optional

All fields returned by Finance::Quote for stock AAPL

stock   field  value
-   -  -
AAPL currency: USD
AAPL   currency_set_by_fq: 1
AAPL date: 12/15/2022
AAPL  isodate: 2022-12-15
AAPL last: 136.61
AAPL   method: iexcloud
AAPL  success: 1
AAPL   symbol: AAPL

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.