alanmarazzi/mepcheck

Is this still working?

ManuelBanza opened this issue · 5 comments

Hi,

Thank you for this project.

I was trying to use this library but I the MP´s for Portugal are not correct, they are not the ones from the last election.
For example Portugal it says that they are attending the parliament in 2021 but they are no longer there:

MPs = mepcheck.get_meps(country = "portugal")
+-----+----------------------------+----------+
| ID | Name | Country |
+-----+----------------------------+----------+
| 28 | Francisco Assis | Portugal |
| 112 | Carlos Coelho | Portugal |
| 187 | José Inácio Faria | Portugal |
| 190 | José Manuel Fernandes | Portugal |
| 194 | Elisa Ferreira | Portugal |
| 195 | João Ferreira | Portugal |
| 240 | Ana Gomes | Portugal |
| 427 | António Marinho E Pinto | Portugal |
| 435 | Marisa Matias | Portugal |
| 446 | Nuno Melo | Portugal |
| 463 | Cláudia Monteiro De Aguiar | Portugal |
| 547 | Paulo Rangel | Portugal |
| 559 | Sofia Ribeiro | Portugal |
| 564 | Liliana Rodrigues | Portugal |
| 565 | Maria João Rodrigues | Portugal |
| 574 | Fernando Ruas | Portugal |
| 606 | Ricardo Serrão Santos | Portugal |
| 609 | Pedro Silva Pereira | Portugal |
| 703 | Miguel Viegas | Portugal |
| 747 | Carlos Zorrinho | Portugal |
| 748 | Inês Cristina Zuber | Portugal |
| 785 | João Pimenta Lopes | Portugal |
| 794 | Manuel Dos Santos | Portugal |
+-----+----------------------------+----------+

check = mepcheck.EUvotes(240)
check.print_attendance()
Last 50 votes attendance for Ana Gomes
+------------+-------+-----------------------------+
| Date | Vote | Topic |
+------------+-------+-----------------------------+
| 2021-01-21 | Loyal | Foreign & security policy |
| 2021-01-21 | Rebel | Employment & social affairs |
| 2021-01-21 | Loyal | Employment & social affairs |
| 2021-01-21 | Rebel | Employment & social affairs |
| 2021-01-21 | Loyal | Fisheries |
| 2021-01-21 | Loyal | Fisheries |
| 2021-01-21 | Loyal | Fisheries |
| 2021-01-21 | Loyal | Fisheries |
| 2021-01-21 | Loyal | Fisheries |
| 2021-01-21 | Loyal | Fisheries |
| 2021-01-21 | Loyal | Fisheries |
| 2021-01-21 | Loyal | Fisheries |
| 2021-01-21 | Rebel | Fisheries |
| 2021-01-21 | Loyal | Fisheries |
| 2021-01-21 | Loyal | Foreign & security policy |
| 2021-01-21 | Rebel | Foreign & security policy |
| 2021-01-21 | Rebel | Foreign & security policy |
| 2021-01-21 | Loyal | Foreign & security policy |
| 2021-01-21 | Loyal | Foreign & security policy |
| 2021-01-21 | Loyal | Foreign & security policy |
| 2021-01-21 | Loyal | Foreign & security policy |
| 2021-01-21 | Loyal | Foreign & security policy |
| 2021-01-21 | Loyal | Foreign & security policy |
| 2021-01-21 | Loyal | Foreign & security policy |
| 2021-01-21 | Loyal | Foreign & security policy |
| 2021-01-21 | Loyal | Foreign & security policy |
| 2021-01-21 | Loyal | Foreign & security policy |
| 2021-01-21 | Loyal | Foreign & security policy |
| 2021-01-21 | Loyal | Foreign & security policy |
| 2021-01-21 | Loyal | Foreign & security policy |
| 2021-01-21 | Loyal | Foreign & security policy |
| 2021-01-21 | Loyal | Foreign & security policy |
| 2021-01-21 | Loyal | Foreign & security policy |
| 2021-01-21 | Loyal | Foreign & security policy |
| 2021-01-21 | Loyal | Foreign & security policy |
| 2021-01-21 | Loyal | Gender equality |
| 2021-01-21 | Rebel | Gender equality |
| 2021-01-21 | Loyal | Gender equality |
| 2021-01-21 | Loyal | Gender equality |
| 2021-01-21 | Rebel | Gender equality |
| 2021-01-21 | Rebel | Gender equality |
| 2021-01-21 | Rebel | Gender equality |
| 2021-01-21 | Rebel | Gender equality |
| 2021-01-21 | Loyal | Gender equality |
| 2021-01-21 | Loyal | Gender equality |
| 2021-01-21 | Loyal | Gender equality |
| 2021-01-21 | Loyal | Gender equality |
| 2021-01-21 | Rebel | Gender equality |
| 2021-01-21 | Loyal | Gender equality |
| 2021-01-21 | Rebel | Gender equality |
+------------+-------+-----------------------------+

Thanks for your help

Hi! Thanks for your interest! I just pushed a hotfix on master, can you try it by installing from the repo (instructions here, just remember to do it either after uninstalling your current mepcheck version or in a new env)?

If it works fine I'll bump the version and trigger a new release.

HI @alanmarazzi !
Thanks for the reply. I uninstalled and installed from the repo but the problem remains, it gives the MEPs from the previous elections and not the ones from 2019.

Here it:

import mepcheck

MPs = mepcheck.get_meps(country = "portugal")

It gives me this image
Captura de ecrã 2021-01-28, às 16 32 47

cheers

Hi again @alanmarazzi

I think I saw already the problem. In the fix that you did you use the URL:
https://term8.votewatch.eu//en/term8-european-parliament-members.html?limit=1000

However that url is not up to date. It does not include the MEPs eleted in the 2019 elections.
If we try the EU portal we can see that for Portugal the MEPs are not the same:
https://www.europarl.europa.eu/meps/en/search/advanced?name=&countryCode=PT

It works for me:
immagine

Be sure that you removed the previous version, and then before trying again run this:

import os
os.remove(os.path.expanduser('~/.meps'))

This removes the cached MEPs from the system, and refreshes it at the next call. Anyway, I think I'll have to add a way to decide the term and to clean that file, of course I'm open to pull requests :)

Let me know if everything works fine

it worked!

Thank you very much!!