Skip to content
This repository has been archived by the owner on Sep 25, 2024. It is now read-only.

List is incomplete in GUI #101

Open
jagadeesh-sudhakaraiah opened this issue Aug 25, 2020 · 16 comments · May be fixed by #110
Open

List is incomplete in GUI #101

jagadeesh-sudhakaraiah opened this issue Aug 25, 2020 · 16 comments · May be fixed by #110
Labels
bug Something isn't working

Comments

@jagadeesh-sudhakaraiah
Copy link

On the first install everything was fine. After few days, countries list seems incomplete. I can connect to the countries that are not listed on the GUI via CLI. List doesn't extended beyond Norway. Everything else works great. Please let me know if additional details are required.

OS: Ubuntu 20.04
Kernel: 5.4.0-42-generic
pip version: 20.0.2
python3 version: 3.8.2

@calexandru2018
Copy link
Owner

Hi @jagadeesh-sudhakaraiah

Thank you for opening this issue. Could you please edit your post and provide the necessary information as per Issue: Bug report template ? Also, please attach some screenshots if possible.

@jagadeesh-sudhakaraiah
Copy link
Author

jagadeesh-sudhakaraiah commented Aug 28, 2020

Describe the bug
ProtonVPN country list is incomplete in GUI.

To Reproduce
I'm not sure as to what caused the reduction of the list.
Steps to reproduce the behavior:

  1. Go to ProtonVPN GUI client.
  2. Scroll down till the end.
  3. End of the list is Norway.

Screenshots
protonvpn_gui
Even the search doesn't include all correct results,
proton_vpn_gui_3

Desktop (please complete the following information):

  • OS: Ubuntu 20.04 LTS (5.4.0-42-generic)
  • pip version: 20.0.2
  • python3 version: 3.8.2

Additional context
Connection to servers not listed in GUI is still possible and the status is correctly displayed both in GUI and tray if the tunnel is established via CLI. Please let me know if additional details are required.

@calexandru2018
Copy link
Owner

calexandru2018 commented Aug 31, 2020

Thank you for the update @jagadeesh-sudhakaraiah

Yes indeed it is a strange behavior and I was also able to replicate this. I'll look closer into this and see if I find what causes this unexpected behavior.

@calexandru2018 calexandru2018 added the bug Something isn't working label Aug 31, 2020
@jagadeesh-sudhakaraiah
Copy link
Author

Oh cool. Thanks for looking into it. Please let me know if any additional information is required.

@geodimm
Copy link

geodimm commented Sep 24, 2020

Hi @jagadeesh-sudhakaraiah ,

I think I know what might be causing this. Upon executing protonvpn-gui I'm getting the following error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/linux_gui/presenters/dashboard_presenter.py", line 384, in populate_server_list
    flag = GdkPixbuf.Pixbuf.new_from_file_at_size(self.dashboard_service.get_flag_path(country), 15,15)
gi.repository.GLib.Error: g-file-error-quark: Failed to open file “/usr/local/lib/python3.8/dist-packages/linux_gui/resources/img/flags/small/Peru.png”: No such file or directory (4)

and the list of countries is incomplete.

As a temporary workaround, I did

sudo cp /usr/local/lib/python3.8/dist-packages/linux_gui/resources/img/flags/small/Unknown.png \
    /usr/local/lib/python3.8/dist-packages/linux_gui/resources/img/flags/small/Peru.png

and it's now displaying all countries :) Hope that helps!

@PeterDaveHello
Copy link

There are 200 jpg images for flags under linux_gui/resources/img/flags/large, but there are only 81 png images for flags under linux_gui/resources/img/flags/small, which is very interesting. Another interesting part is about the file name: small images is using country name, but large images is using country code.

@PeterDaveHello
Copy link

Also found another inconsistency: there are 250 countries in linux-cli's country_codes.py, but there are only 200 jpg images for flags under linux_gui/resources/img/flags/large.

@Papigoe
Copy link

Papigoe commented Oct 22, 2020

Hi @jagadeesh-sudhakaraiah ,

I think I know what might be causing this. Upon executing protonvpn-gui I'm getting the following error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/linux_gui/presenters/dashboard_presenter.py", line 384, in populate_server_list
    flag = GdkPixbuf.Pixbuf.new_from_file_at_size(self.dashboard_service.get_flag_path(country), 15,15)
gi.repository.GLib.Error: g-file-error-quark: Failed to open file “/usr/local/lib/python3.8/dist-packages/linux_gui/resources/img/flags/small/Peru.png”: No such file or directory (4)

and the list of countries is incomplete.

As a temporary workaround, I did

sudo cp /usr/local/lib/python3.8/dist-packages/linux_gui/resources/img/flags/small/Unknown.png \
    /usr/local/lib/python3.8/dist-packages/linux_gui/resources/img/flags/small/Peru.png

and it's now displaying all countries :) Hope that helps!

Upon executing your workaround, I got this:
cp: cannot stat '/usr/local/lib/python3.8/dist-packages/linux_gui/resources/img/flags/small/Unknown.png': No such file or directory

@atmin
Copy link

atmin commented Oct 25, 2020

@Papigoe most probably your Python version is different than example given. Type python3 --version. You'll get something like Python 3.6.9. Replace both python3.8 occurrences in the cp paths with python3.6 (according to your actual version major.minor).

Or go to that directory in one command and copy file in another:

cd /usr/local/lib/python`python3 --version | grep -oE '3\..'`/dist-packages/linux_gui/resources/img/flags/small
sudo cp Unknown.png Peru.png

@Papigoe
Copy link

Papigoe commented Oct 25, 2020 via email

@geodimm
Copy link

geodimm commented Oct 26, 2020

@Papigoe

You could also try something like

sudo find /usr/local/lib -name linux_gui -type d

You should get the first part of the path.

gorilamagilla added a commit to gorilamagilla/linux-gui that referenced this issue Nov 1, 2020
@gorilamagilla gorilamagilla linked a pull request Nov 1, 2020 that will close this issue
@mikewesten
Copy link

Ditto. I am only seeing A through N listed in the GUI. The last available country is Norway. Using the terminal is the only way to access O through Z.

@SirLaffalot
Copy link

If you have image magick, then

sudo convert /usr/lib/python3.9/site-packages/linux_gui/resources/img/flags/large/pe.jpg -resize 720x720 /usr/lib/python3.9/site-packages/linux_gui/resources/img/flags/small/Peru.png

fixes it

@Papigoe
Copy link

Papigoe commented Feb 7, 2021

If you have image magick, then

sudo convert /usr/lib/python3.9/site-packages/linux_gui/resources/img/flags/large/pe.jpg -resize 720x720 /usr/lib/python3.9/site-packages/linux_gui/resources/img/flags/small/Peru.png

fixes it

Worked a treat! Thanks to all of you for your help.

@cbdejavu
Copy link

cbdejavu commented Feb 7, 2021

If you have image magick, then

sudo convert /usr/lib/python3.9/site-packages/linux_gui/resources/img/flags/large/pe.jpg -resize 720x720 /usr/lib/python3.9/site-packages/linux_gui/resources/img/flags/small/Peru.png

fixes it

This fixed it for me as well. so is the issue something that should be reported upstream to the python project? Is the problem because the python project didn't provide the small country flag for peru?

@calexandru2018
Copy link
Owner

@cbdejavu this is an issue with a missing flag. This project will no longer receive updates as the official GUI for the official CLI is currently being worked on.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants