[gnucash-br] Erro no módulo tesouro.pm

rmcasali em gmail.com rmcasali em gmail.com
Sex Dez 11 14:44:50 EST 2020


Boa tarde Adriano e d+ pessoal da lista,

Segue em anexo o arquivo do tesouro que estou usando (não sei se é a
mesma que você tem), rodei o seu comando sem problemas. 

Mas fique atento se o horário que você está atualizando não é um
horário em que o tesouro está fechado. Você não consegue pegar a
cotação.

Abraço,
Rafael 

--- Output ------------------------------

$ gnc-fq-dump -v tesouro Selic01032025
Finance::Quote fields Gnucash uses:
    symbol: Selic01032025        <=== required
      date: 12/11/2020           <=== recommended
  currency: BRL                  <=== required
      last: 10657.35             <=\       
       nav:                      <=== one of these
     price: 10657.35             <=/        
  timezone:                      <=== optional

All fields returned by Finance::Quote for stock Selic01032025

stock           field  value
-----           -----  -----
Selic01032025   currency: BRL
Selic01032025       date: 12/11/2020
Selic01032025   errormsg: 
Selic01032025    isodate: 2020-12-11
Selic01032025       last: 10657.35
Selic01032025     method: tesouro
Selic01032025       name: Tesouro Selic 2025
Selic01032025      price: 10657.35
Selic01032025     source: http://www.tesouro.gov.br/
Selic01032025    success: 1
Selic01032025     symbol: Selic01032025
----------------------------------------------------------------------

Em qui, 2020-12-10 às 15:00 -0300, Adriano escreveu:
> Pessoal, Casali,
> 
> Estou tendo problema no tesouro.pm
> 
> Colo abaixo o retorno do comando "gnc-fq-dump -v tesouro
> Selic01032025" (com DEBUG = 1 no arquivo):
> 
> [debug]: 
> https://www.tesourodireto.com.br//json/br/com/b3/tesourodireto/service/api/treasurybondsinfo.json
> [debug]: 500
> Finance::Quote fields Gnucash uses:
>     symbol: Selic01032025 (deduced) <=== required
>       date: ** missing **        <=== recommended
>   currency: ** missing **        <=== required
>       last: **missing**          <=\      
>        nav: **missing**          <=== one of these
>      price: **missing**          <=/        
>   timezone:                      <=== optional
> 
> ** This stock quote cannot be used by GnuCash!
> 
> 
> All fields returned by Finance::Quote for stock Selic01032025
> 
> stock           field  value
> -----           -----  -----
> Selic01032025   errormsg: Error contacting URL
> Selic01032025       last: **missing**
> Selic01032025        nav: **missing**
> Selic01032025      price: **missing**
> Selic01032025    success: 0
> 
> Parece que o módulo não consegue acessar o site (erro 500). Mas o
> site funciona no Firefox. E o módulo Yahoo json do Finance Quote
> também funciona sem problema.
> 
> Já reinstalei o gnucash, e estou usando ele no Fedora. Abaixo segue a
> lista dos pacotes instalados:
> 
> =====================================================================
> =====================================================================
> ===============
>  Package                                          Architecture      
>           Version                               Repository          
>           Size
> =====================================================================
> =====================================================================
> ===============
> Installing:
>  gnucash                                          x86_64            
>           4.2-1.fc33                            updates              
>          11 M
> Installing dependencies:
>  aqbanking                                        x86_64            
>           6.1.4-2.fc33                          fedora              
>          1.2 M
>  gnucash-docs                                     noarch            
>           4.2-1.fc33                            updates              
>          47 M
>  gwenhywfar                                       x86_64            
>           5.3.0-3.fc33                          fedora              
>          532 k
>  gwenhywfar-gui-gtk3                              x86_64            
>           5.3.0-3.fc33                          fedora              
>           39 k
>  libdbi                                           x86_64            
>           0.9.0-16.fc33                         fedora              
>           50 k
>  libdbi-drivers                                   x86_64            
>           0.9.0-16.fc33                         fedora              
>          371 k
>  libofx                                           x86_64            
>           0.9.13-6.fc33                         fedora              
>          144 k
>  opensp                                           x86_64            
>           1.5.2-35.fc33                         fedora              
>          904 k
>  perl-CGI                                         noarch            
>           4.50-4.fc33                           fedora              
>          198 k
>  perl-English                                     noarch            
>           1.11-464.fc33                         updates              
>          26 k
>  perl-Finance-Quote                               noarch            
>           1.49-5.fc33                           fedora              
>          222 k
>  perl-HTML-Element-Extended                       noarch            
>           1.18-21.fc33                          fedora              
>           39 k
>  perl-HTML-TableExtract                           noarch            
>           2.15-6.fc33                           fedora              
>           36 k
>  perl-HTML-Tree                                   noarch            
>           1:5.07-13.fc33                        fedora              
>          214 k
>  perl-JSON-Parse                                  x86_64            
>           0.57-2.fc33                           fedora              
>           84 k
>  perl-String-Util                                 noarch            
>           1.31-1.fc33                           fedora              
>           29 k
>  perl-Text-Template                               noarch            
>           1.59-2.fc33                           fedora              
>           61 k
>  perl-Time-Piece                                  x86_64            
>           1.3401-464.fc33                       updates              
>          55 k
>  sgml-common                                      noarch            
>           0.6.3-55.fc33                         fedora              
>           54 k
>  xmlsec1-gcrypt                                   x86_64            
>           1.2.29-2.fc33                         fedora              
>           51 k
>  xmlsec1-gnutls                                   x86_64            
>           1.2.29-2.fc33                         fedora              
>           43 k
> Installing weak dependencies:
>  libdbi-dbd-sqlite                                x86_64            
>           0.9.0-16.fc33                         fedora              
>           24 k
> 
> 
> O tesouro.pm está funcionando para vocês? Alguém teria alguma ideia
> do que eu poderia tentar para resolver?
> 
> Abraço,
> Adriano
> _______________________________________________
> gnucash-br mailing list
> gnucash-br em gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-br
-------------- Próxima Parte ----------
Um anexo não-texto foi limpo...
Nome: tesouro.pm
Tipo: application/x-perl
Tamanho: 4166 bytes
Descrição: não disponível
URL: <http://lists.gnucash.org/pipermail/gnucash-br/attachments/20201211/88956ffd/attachment.pl>


Mais detalhes sobre a lista de discussão gnucash-br