2019-08-21 14:23:43 (edited by pauliyobo 2019-08-21 14:24:05)

Hello.
A while ago I remember creating a little aplication which would allow you to convert a currency to an other.
Someone made a topic asking about an application that could help with conversions.
I pasted a download link even there and thought that I could create a topic and release the application to the public.
Anyway, this simple interface is composed by an edit box, which is the amount to insert, and 2 combo boxes which are the currency to convert from and the currency to convert to. Note currently the combo boxes do not have a default value which means you'll have to selct them manually if you want to successfully convert.
There is obviously the button to convert the currency and alternatively there is an button which will allow you to update the latest rates.
Yes, because currently the program downloads all the rates values in a file so that the program can be used without depending on an internet connection. Which means that to get the most up to date currencies you should press that button. If the file is not present, the file will be downloaded automatically when the progam is started.
Hope this can be helpful to you guys, and please feel free to give suggestions, and critics.
To download the application currently hosted on github you can click on the link below.
Download[
Enjoy.

Paul

2019-08-21 14:53:07

Traceback (most recent call last):
  File "site-packages\requests\packages\urllib3\connection.py", line 135, in _new_conn
  File "site-packages\requests\packages\urllib3\util\connection.py", line 90, in create_connection
  File "site-packages\requests\packages\urllib3\util\connection.py", line 80, in create_connection
TimeoutError: [WinError 10060] The attempt to establish a connection was unsuccessful because the required response was not received from another computer in the required time, or an already established connection was disconnected due to an incorrect response from an already connected computer
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "site-packages\requests\packages\urllib3\connectionpool.py", line 559, in urlopen
  File "site-packages\requests\packages\urllib3\connectionpool.py", line 345, in _make_request
  File "site-packages\requests\packages\urllib3\connectionpool.py", line 782, in _validate_conn
  File "site-packages\requests\packages\urllib3\connection.py", line 215, in connect
  File "site-packages\requests\packages\urllib3\connection.py", line 144, in _new_conn
requests.packages.urllib3.exceptions.NewConnectionError: <requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x03900550>: Failed to establish a new connection: [WinError 10060] The attempt to establish a connection was unsuccessful because the required response was not received from another computer in the required time, or an already established connection was disconnected due to an incorrect response from an already connected computer
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "site-packages\requests\adapters.py", line 370, in send
  File "site-packages\requests\packages\urllib3\connectionpool.py", line 609, in urlopen
  File "site-packages\requests\packages\urllib3\util\retry.py", line 271, in increment
requests.packages.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.exchangeratesapi.io', port=443): Max retries exceeded with url: /latest (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x03900550>: Failed to establish a new connection: [WinError 10060] The attempt to establish a connection was unsuccessful because the required response was not received from another computer in the required time, or an already established connection was disconnected due to an incorrect response from an already connected computer
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 22, in <module>
  File "src\downloadrates.py", line 7, in src.downloadrates.download
  File "site-packages\requests\api.py", line 69, in get
  File "site-packages\requests\api.py", line 50, in request
  File "site-packages\requests\sessions.py", line 468, in request
  File "site-packages\requests\sessions.py", line 576, in send
  File "site-packages\requests\adapters.py", line 423, in send
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.exchangeratesapi.io', port=443): Max retries exceeded with url: /latest (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x03900550>: Failed to establish a new connection: [WinError 10060] The attempt to establish a connection was unsuccessful because the required response was not received from another computer in the required time, or an already established connection was disconnected due to an incorrect response from an already connected computer
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 27, in <module>
NameError: name 'self' is not defined

2019-08-21 15:22:20

hello
same error

let's rock!

2019-08-21 15:32:33

yeah my bad. That seemed to not bethe latest build.
I'm not sure if you will not be getting the error again as the original exception was derived from an error while trying to download the rates file, but at least the other errors were cleared.

Paul

2019-08-21 15:33:06

sorry for the double post, the link should be the same one in the first post.

Paul

2019-08-21 15:48:24

error
An error prevented the application to download the latest rates
OK
Traceback (most recent call last):
  File "main.pyw", line 28, in <module>
  File "src\interface.py", line 16, in src.interface.currency_gui.__init__
  File "src\interface.py", line 28, in src.interface.currency_gui.initUI
  File "src\conversion.py", line 9, in src.conversion.listcurrencies
FileNotFoundError: [Errno 2] No such file or directory: 'rates.txt'

2019-08-21 15:50:31 (edited by pauliyobo 2019-08-21 15:51:22)

yeah exactly that. Maybe I should provide the rates file  just in case it fails.
Trying to figure out why the download fails on your end and not in mine. hmm.

Paul

2019-08-23 10:44:02

I'm not sure what niche this program is filling, seems more like a practice project to me.
I mean typing 5.00 CAD in USD into Google for instance, gets you the same result.
I could see this being useful for seniors who are scared of the internet/google though I guess.

2019-08-23 12:32:14

@8 it pretty much is. If it's not useful to you you should not use it. I pretty much posted it here in case someone needed it.

Paul

2019-08-23 22:19:22 (edited by Riad 2019-08-23 22:20:04)

Plus many currencies, including my country's, are not there, so my only use for it would be when converting US Dollars to Euros or inversely, something I could do on Google's builtin currency convertor. Anyway, congrats for releasing the app and keep up the good work.

2019-08-23 22:37:49

@10 Unfortunately many currencies miss because the API I'm using does not include some currencies. To get more currencies I'd have to switch to a Paid but more complex API, but I do not have financial resources to handle the API as cheap as it could be.

Paul

2019-08-24 13:20:17

does this program have source code available? or did you just upload the folder on github? the last time i checked, i just saw that there was 1 exe file, and no other text files, and i got an error. It seems like the error has been fixed based on the posts, i will take a look at it now and download it.

best regards
never give up on what ever you are doing.

2019-08-24 13:26:48

\Hi, i ran the program, and i could not get it to work. I don't know what the problem might be. i get the faitle error, error executing script main. ok

best regards
never give up on what ever you are doing.

2019-08-24 13:47:53

Nope, there is no source code available. But I guess I could provide that too. I was planning to migrate the project to c# and winforms, but not sure.

Paul