Hi Damjan,

Thanks, that seems to have fixed it (still downloading stats)!

The script is invoked for example with:

python get-aoo-stats.py all.lst 2024-09-27 > ./csv/2024-09-27.csv

That gives me the download stats for yesterday in a CSV file.

When successful, I will update the script in our SVN.

Regards,

   Matthias

Am 28.09.24 um 15:18 schrieb Damjan Jovanovic:


On Sat, Sep 28, 2024 at 12:11 PM Matthias Seidel <matthias.sei...@hamburg.de> wrote:

    Hi All,

    Until now I could run the python scripts here:

    https://svn.apache.org/repos/asf/openoffice/devtools/aoo-stats/

    because I still was able to install Python 2 on Ubuntu 22.04.

    After upgrading to Ubuntu 24.04 I cannot do this anymore. Running the
    scripts with Python 3 gives me errors.

    Could someone with Python knowledge have a look at those scripts,
    please?

    Regards,

        Matthias


Hi

You haven't really given examples of how to run those scripts, but I think I fixed one of them.

I just had to:
* Change the urllib import to urllib.request:
-import urllib
+import urllib.request
* Delete the unused and now invalid urllib.urlencode import:
-from urllib import urlencode
* Change urllib.urlopen() to urllib.request.urlopen():
-            conn = urllib.urlopen(url)
+            conn = urllib.request.urlopen(url)
* Change every print x to print(x).

The complete patch is attached so you can test it with Python 3. I am not sure how to run it or what output it's supposed to give.

Regards
Damjan




---------------------------------------------------------------------
To unsubscribe, e-mail:dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail:dev-h...@openoffice.apache.org

Attachment: smime.p7s
Description: Kryptografische S/MIME-Signatur

Reply via email to