Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception ob zagonu skripte #135

Open
matejhacin opened this issue May 2, 2024 · 11 comments
Open

Exception ob zagonu skripte #135

matejhacin opened this issue May 2, 2024 · 11 comments

Comments

@matejhacin
Copy link

matejhacin commented May 2, 2024

Pozdravljeni,

Ob zagonu ib_edavki /Users/matejh/Downloads/tax_2021.xml /Users/matejh/Downloads/tax_2022.xml /Users/matejh/Downloads/tax_2023.xml /Users/matejh/Downloads/tax_2024.xml debim sledeč error stacktrace:

Screenshot 2024-05-02 at 11 07 34

Poizkusil sem tudi z drugačnimi parametri kot npr. ib_edavki tax_2021 ali ib_edavki /Users/matejh/Downloads/tax_2021.xml ampak vedno dobim isti error.

Nekaj dodatnih informacij:

  • Python 3.12.2
  • macOS Sonoma 14.4.1
  • git version 2.39.3
@jamsix
Copy link
Owner

jamsix commented May 2, 2024

Python pravi, da ne zna preverit certifikata https://github.com/jamsix/ib-edavki/raw/master/companies.xml

Verjetno si za kakim TLS decrypting proxyjem. Služben laptop?

Poskusi curl -vvv https://github.com/jamsix/ib-edavki/raw/master/companies.xml

@matejhacin
Copy link
Author

Hm, ne, nič od tega. Prvič, ko sem poskusil, sem imel vklopljen VPN, ampak sem potem tudi brez probal - isti rezultat.

curl na isti URL gre čez, ib_edavki pa še vseeno faila. Čudno.

Screenshot 2024-05-03 at 16 53 00

BTW, sem potem rešil težavo tako, da sem vse 3 datoteke ročno prenesel in sem tako uspešno pognal skripto, ampak brez tega pa žal še vedno faila.

Sicer sem stvar researchal in vidim, da se gre res najverjetneje za bug na moji strani, tako da se oproščam za ticket :) Je pa dobrodošla še kakšna ideja za debuggiranje, ker meni je žal zmanjkalo, saj sem updejtal Python, git in macOS (glede na to da macOS avtomatsko menedžerira znane CA).

@jamsix
Copy link
Owner

jamsix commented May 3, 2024

Kot kaže requests v pythonu ne uporablja sistemskega CA stora. Poskusi še pip install certifi --upgrade

@sasos90
Copy link

sasos90 commented May 22, 2024

Tudi meni se podobno dogaja. Nimam nobenih proxyjev, VPNja itd. Dobim pa 403 status.
Men sicer zgleda noče fetchat tega fajla:
bsRateXmlUrl = "https://www.bsi.si/_data/tecajnice/dtecbs-l.xml"

@jamsix
Copy link
Owner

jamsix commented May 23, 2024

@sasos90 tvoj problem je drugačen. bsi.si strežnik po novem ne sprejema zahtevkov brez ustreznega User-Agent stringa. Popravljeno v #137 in bo na voljo v kratkem.

@sasos90
Copy link

sasos90 commented May 23, 2024

@jamsix super! hvala!

@jamsix
Copy link
Owner

jamsix commented May 28, 2024

#137 mergan, @sasos90 poskusi.

@jamsix jamsix closed this as completed May 28, 2024
@sasos90
Copy link

sasos90 commented May 29, 2024

Hm, @jamsix sedaj dobim tole:

$ ib_edavki.exe ib-xml-file-2024.xml
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\saso\AppData\Local\Programs\Python\Python312\Scripts\ib_edavki.exe\__main__.py", line 4, in <module>
  File "C:\Users\saso\AppData\Local\Programs\Python\Python312\Lib\site-packages\ib_edavki.py", line 10, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'

Če ročno instaliram "requests" dependency, potem dela vse super.

@jamsix jamsix reopened this May 30, 2024
@jamsix
Copy link
Owner

jamsix commented May 30, 2024

OK, si zrihtal. Moram dodat requests v setup.py

@Hrastopow
Copy link

Oj, jaz imam isti problem in sicer, da ob tem, ko dodam parameter -t, dobim sledeči error. Brez parametra -t deluje OK. Kaj bi lahko bilo narobe?
Uploading error_ibkrscript.jpg…

@Hrastopow
Copy link

Mi je uspelo rešiti, če bo imel še kdo podobno težavo. Pod Applications -> Python se nahaja skripta "Install Certificates.command". Double klik in požene skripto. Po tem več ni vrglo napake :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants