Commons talk:Photo challenge/Archives/2024
This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Trouble running C# maintenance codes
Last 8 years administering Photo Challenge I was relying on C# codes written by User:Colin for automatically processing Photo Challenge pages. The codes:
went almost unchanged since they were written over a decade ago. They are meant to be run on your PC in Visual Studio. This month, the codes stopped compiling for me and so far I was not able to create voting pages or score last month results. I am very familiar with several dozen programing languages but not with C# and its external libraries management. As I am, fighting with this issue, maybe someone more familiar with Visual Studio and C# can also try to get those codes to compile and produce voting pages. Jarekt (talk) 03:06, 7 January 2024 (UTC)
- Hi Jarekt. I can take a look. What version of Visual Studio or other tool are you using? -- Colin (talk) 18:56, 7 January 2024 (UTC)
- I've taken the code above and used it to create the voting pages for January. I can also run the vote counting code but not sure what your current policy is on voters who have too few contributions or who voted incorrectly. Do you ask them to change their vote or something else? Anyway I don't see a problem with running the code. I am using the Visual Studio 2022 Community Edition that you can download from here. Perhaps you can try downloading that again (it just downloads a small bootstrapping web installer). I can email you the *.sln, *.csproj packages.config files that go with this, if that helps.
- Here's the "errors" on the "2023 November Bicycles" voting:
- https://commons.wikimedia.org/wiki/Special:Contributions/M&A gave Response status code does not indicate success: 404 (Not Found). (Note, that might be an issue with the '&' in their username. I may have to try to fix the code to handle them. But this user has enough contribs).
- https://commons.wikimedia.org/wiki/Special:Contributions/Damianfossi has too few contributions
- https://commons.wikimedia.org/wiki/Special:Contributions/efux voted wrongly: 1, 1
- https://commons.wikimedia.org/wiki/Special:Contributions/Guysimard44 has too few contributions
- https://commons.wikimedia.org/wiki/Special:Contributions/Inhigo has too few contributions
- https://commons.wikimedia.org/wiki/Special:Contributions/M&A has too few contributions
- https://commons.wikimedia.org/wiki/Special:Contributions/Nazarenav has too few contributions
- https://commons.wikimedia.org/wiki/Special:Contributions/Любмир voted wrongly: 3, 3, 3, 3, 2, 2, 2
- Here's the "errors" on the "2023 - November - Too many to count" voting:
- https://commons.wikimedia.org/wiki/Special:Contributions/Любмир voted wrongly: 3, 3, 3, 3, 3, 3, 3
- If you can deal with them, let me know when the voting is fixed up and I'll run the programs again and create the award pages. Or hopefully you have it resolved by then. -- Colin (talk) 21:47, 7 January 2024 (UTC)
- @Colin: Could you please publish the .sln and packages.config files (the .sln is not that important) either on-wiki or in a source code repository such as https://gitlab.wikimedia.org/? It would allow anyone to run the program, not only Jarekt, now and in the future. I tried to look at the program, but I stopped when I saw the
using HtmlAgilityPack;
lines – without having the appropriate<PackageReference>
or packages.config entry, I wouldn’t be able to run it. —Tacsipacsi (talk) 23:53, 7 January 2024 (UTC)- Colin Thanks for helping with this. I almost never ask people to fix the votes and just correct the issues I encounter. Each voting page does have the sentence: "Voters who voted for more than one 1st, 2nd or 3rd place will have those votes converted to Highly Commended praises. Other votes not complying with the requirements will be removed. In some cases users might be asked to correct their votes after voting ends." That explains what will happen. I also remove extra images from submission pages in case someone has more than 4 entries, by personally deciding which 4 are the best. I always try to explain what I did in edit summary which includes user name.
- As for my Visual Studio, I had a very hard time getting some other VS compiler to work after it suddenly stopped working, I ended up installing and reinstalling several versions of VS multiple times until I got the other issues resolved but that left me with broken C# compiler. So presently, I have both VS 2022 (Microsoft Visual Studio Professional 2022 (2) (64-bit) Version 17.8.3) and VS 2019 running on my machine. My old .sln files would no longer open in VS 2022 so I tried to create project from scratch. I added HtmlAgilityPack through some sort "NuGet package controller", but I was getting errors "error CS0234: The type or namespace name 'Http' does not exist in the namespace 'System.Net' (are you missing an assembly reference?)". Adding "System.Net.Http" through NuGet did not solved the issue so I searched through discussion boards and some people thought that you no longer need to include it. I tried to comment it out but than I would get "error CS5001: Program does not contain a static 'Main' method suitable for an entry point" error. Whatever it means. I will work on resolving the above issues. I also think it would be good to have GitLab repository for the project, as Tacsipacsi suggested. --Jarekt (talk) 02:39, 8 January 2024 (UTC)
- I'll see what I can do tonight. I should be able to update things so only .cs and a .csproj file are needed and I think those can be uploaded here. Now that I know you have 2022, I can use the latest project style that does away with packages.config.
- FYI, I think the error you are getting are because references to libraries are done in (at least) two ways. There are the older style "assembly" references that you get when using the "Add Project References..." right-click menu, which launches the "Reference Manager". And there are new style "nuget" package references that you get using the "Manage NuGet Packages..." menu. I think the one you are missing is the former kind. But you also might have created the wrong project type when trying to recreate the project. It currently needs to be a .net framework console app, and you might have picked .net core console app.
- I'll also have a go at updating it to .net core (it is currently .net framework). Then someone could build and run it on Windows, Linux or a Mac and you wouldn't need Visual Studio, just some command-line tools and a text editor (though you can still use Visual Studio) -- Colin (talk) 08:45, 8 January 2024 (UTC)
- @Colin: Could you please publish the .sln and packages.config files (the .sln is not that important) either on-wiki or in a source code repository such as https://gitlab.wikimedia.org/? It would allow anyone to run the program, not only Jarekt, now and in the future. I tried to look at the program, but I stopped when I saw the
Jarekt Here are the files you will need to build the two programs. I suggest you put them into two brand new folders without any of the existing files. You only need the cs and the csproj files. When you open the csproj, Visual Studio will create an sln file for you (and offer to save it to disk when you close things). The csproj file no longer needs a separate packages.config and also doesn't need to list the source files being used -- it just assumes any file in the directory is part of the project.
- Commons:Photo challenge/code/CreateVoting.cs
- Commons:Photo challenge/code/CreateVoting.csproj
- Commons:Photo challenge/code/voting.cs
- Commons:Photo challenge/code/voting.csproj
I've modified the source of each so that you don't need to keep building it and running it in Visual Studio if you don't want to. Once you have built it (the output will go into a bin\Debug\net80 folder) then you could copy the contents of that into another folder on your PATH (for example, create C:\PhotoChallenge and stick it there and then add C:\PhotoChallenge to your PATH). Then you can run the script by supplying the name of the challenge on the command line. You will need to put the challenge name in double quotes so that it is interpreted by the program as one command line argument. For example voting.exe "A great challenge"
.
I hope this solves the problems you've been having. I've set the csproj files to use .net core 8.0 so you will need the latest version of Visual Studio 2022. Let me know if you have any problems. -- Colin (talk) 21:37, 8 January 2024 (UTC)
- Btw, do you ever use Commons:Photo challenge/code/CreateVotingDuo.cs]? If you do I can fix it too. For now, I've removed mention of it from the Maintainer's Manual. -- Colin (talk) 21:44, 8 January 2024 (UTC)
- Colin, those project files worked for me, and I like the new compile-once run-forever schema. I just created a run.bat text file with
bin\Debug\net80\CountVoting.exe "2023 - November - Too many to count"
to run it. Thanks again for your help. --Jarekt (talk) 05:05, 10 January 2024 (UTC)- Tacsipacsi do you want to try the new .csproj files to see if you can also get the code to compile? It would be nice to have more people able to run it. --Jarekt (talk) 05:08, 10 January 2024 (UTC)
- I'm glad it is working for you now. Just be careful where you run the program, because if the various output files end up in the same folder as the CreateVoting.csproj or Voting.csproj, then the next time you open Visual Studio for those projects, it might think those files part of the project. I suspect no harm would come, as it wouldn't try to compile a .txt file, but it could be confusing. Better to have another folder for working in and link to the exe with e.g.
..\CreateVoting\bin\Debug\net80\CreateVoting.exe
or similar. -- Colin (talk) 10:57, 10 January 2024 (UTC)
- I'm glad it is working for you now. Just be careful where you run the program, because if the various output files end up in the same folder as the CreateVoting.csproj or Voting.csproj, then the next time you open Visual Studio for those projects, it might think those files part of the project. I suspect no harm would come, as it wouldn't try to compile a .txt file, but it could be confusing. Better to have another folder for working in and link to the exe with e.g.
- Tacsipacsi do you want to try the new .csproj files to see if you can also get the code to compile? It would be nice to have more people able to run it. --Jarekt (talk) 05:08, 10 January 2024 (UTC)
- Colin, those project files worked for me, and I like the new compile-once run-forever schema. I just created a run.bat text file with
Feb 2024
Lunar/Lunisolar New Year is coming. :) RZuo (talk) 12:20, 10 January 2024 (UTC)
Photo challenge November results
Rank | 1 | 2 | 3 |
---|---|---|---|
image | |||
Title | Through the flooded street on a bicycle |
Bicycle helihoisting | Silvia Persico and Esmée Peperkamp in Tourmalet during TDFF 2023 |
Author | Debanutosh | Ibex73 | Shougissime |
Score | 20 | 17 | 14 |
Congratulations to Debanutosh, Shougissime and Ibex73. -- Jarekt (talk) 05:12, 10 January 2024 (UTC)
- 2nd place is now nominated for deletion: Commons:Deletion requests/Files uploaded by Eliteextant. RZuo (talk) 12:08, 10 January 2024 (UTC)
- At least, it should be removed from the contest. Images without full EXIF data should not be accepted in photo contests. Yann (talk) 12:16, 10 January 2024 (UTC)
- It is always sad to lose wining images to deletion, although it is often necessary. I would be OK with requiring all contestants to have EXIF data, but only if there are some automatic ways to detect images that do not have them. Commons:Photo challenge/code/CreateVoting.cs is the source code used for creating voting pages and it already rejects files summited too early or too late, if someone knows how to add a test for EXIF we cold reject those too. --Jarekt (talk) 02:37, 12 January 2024 (UTC)
- I am fully against demanding EXIF data for all entries - we have a lot of challenges where location is not relevant (food, tools etc.), but could reveal where an anonymous user is living and through this make him an easy target for harassment. Kritzolina (talk) 06:56, 12 January 2024 (UTC)
- i would trust voters to exercise more caution when they vote. at least that's what i would do if i spot irregularities during voting.
- a photo without exif, by an account without much other edits, is clearly suspicious. RZuo (talk) 09:25, 12 January 2024 (UTC)
- I am fully against demanding EXIF data for all entries - we have a lot of challenges where location is not relevant (food, tools etc.), but could reveal where an anonymous user is living and through this make him an easy target for harassment. Kritzolina (talk) 06:56, 12 January 2024 (UTC)
- It is always sad to lose wining images to deletion, although it is often necessary. I would be OK with requiring all contestants to have EXIF data, but only if there are some automatic ways to detect images that do not have them. Commons:Photo challenge/code/CreateVoting.cs is the source code used for creating voting pages and it already rejects files summited too early or too late, if someone knows how to add a test for EXIF we cold reject those too. --Jarekt (talk) 02:37, 12 January 2024 (UTC)
- At least, it should be removed from the contest. Images without full EXIF data should not be accepted in photo contests. Yann (talk) 12:16, 10 January 2024 (UTC)
Rank | 1 | 2 | 3 |
---|---|---|---|
image | |||
Title | Henri-Chapelle American Cemetery and Memorial |
Pacific Sardines - Monterey Bay Aquarium (California) |
Eriophorum_scheuchzeri in Vanoise National Park |
Author | Foeniz | Changku88 | Ibex73 |
Score | 19 | 15 | 14 |
Congratulations to Foeniz, Changku88 and Ibex73. -- Jarekt (talk) 02:30, 12 January 2024 (UTC)
- Thank you Foeniz (talk) 10:14, 12 January 2024 (UTC)
Photo challenge December results
Rank | 1 | 2 | 3 |
---|---|---|---|
image | |||
Title | Gewinnung und Verbrennung | Lusatian lignite briquette of the Rekord brand from the former GDR |
Feuerraum einer Dampflokomotive. Топка паровоза IMG 5655WI |
Author | Mensch01 | Lusi Lindwurm | Kora27 |
Score | 22 | 16 | 13 |
Congratulations to Mensch01, Lusi Lindwurm and Kora27. -- Jarekt (talk) 03:27, 22 February 2024 (UTC)
Rank | 1 | 2 | 3 |
---|---|---|---|
image | |||
Title | Sweet collection in a box | Escape artist | Blown out quail eggs in a cardboard box |
Author | Hgrobe | Горбунова М.С. | Ermell |
Score | 12 | 9 | 8 |
Congratulations to Hgrobe, Горбунова М.С. and Ermell. -- Jarekt (talk) 03:54, 22 February 2024 (UTC)
Photo challenge January results
Rank | 1 | 2 | 3 |
---|---|---|---|
image | |||
Title | Garfield Grain Elevator and Silos Garfield Washington USA |
Feed silos in Hirschbrunn near Burgebrach |
Silos of the Hannoversche Portland -Cementfabrik (abandoned in 1986) |
Author | DaveGinOly | Ermell | Hgrobe |
Score | 19 | 13 | 8 |
Rank | 1 | 2 | 3 |
---|---|---|---|
image | |||
Title | Narrentag 2024 - Elzacher Schuttig |
Kirchseoner Perchtenlauf - old winter parade tradition in Bavaria. Mask of type "Klaubauf" |
Taken in Dublin, march 2014 |
Author | Rainer Halama | Würmchen-vom-Mölchlein | Oncewerecolours |
Score | 13 | 13 | 10 |
Congratulations to DaveGinOly, Ermell and Hgrobe. -- Jarekt (talk) 01:40, 22 March 2024 (UTC) Congratulations to Rainer Halama, v and Oncewerecolours. -- Jarekt (talk) 01:59, 22 March 2024 (UTC)
Photo challenge February results
Rank | 1 | 2 | 3 |
---|---|---|---|
image | |||
Title | Boat knot | Figure-eight loop in mountaineering |
Root knot of a beech tree |
Author | Teseo | Wagner Cxxx | Foeniz |
Score | 11 | 9 | 8 |
Rank | 1 | 2 | 3 |
---|---|---|---|
image | |||
Title | Dragon Dance, Oklahoma City, OK, Lunar New Year, 2024 (Year of the Dragon) |
Sec. 1, Wuchang St., Taipei City, with LED lights decorations above on 2024 Chinese New Year |
Eu Tong Sen Street in Chinatown, Singapore, with CNY decorations above |
Author | OKJaguar | Junyu-K | S5A-0043 |
Score | 11 | 9 | 9 |
Congratulations to Teseo, Wagner Cxxx, Foeniz, OKJaguar, Junyu-K and S5A-0043. -- Jarekt (talk) 02:28, 17 April 2024 (UTC)
Photo challenge March results
Rank | 1 | 2 | 3 |
---|---|---|---|
image | |||
Title | Sieben graue Köpfe | Reflections - Shyok River | Nina-Replica |
Author | Mensch01 | Prof Ranga Sai | Wingerham52 |
Score | 20 | 18 | 11 |
Congratulations to Mensch01, Prof Ranga Sai and Wingerham52. -- Jarekt (talk) 02:55, 21 May 2024 (UTC)
Rank | 1 | 2 | 3 |
---|---|---|---|
image | |||
Title | Palazzo di Guistizia with Courte di Cassazione at river Tiber, Rome, Italy |
North facade of Palais de justice de Paris. | Supreme Court of Finland at night |
Author | Mozzihh | FreCha | GPSLeo |
Score | 19 | 15 | 12 |
Congratulations to Mozzihh, FreCha and GPSLeo. -- Jarekt (talk) 03:30, 21 May 2024 (UTC)
Photo challenge April results
Rank | 1 | 2 | 3 |
---|---|---|---|
image | |||
Title | Колонны здания администрации и думы Новгородской области 2H1A4397WI |
Columns on the façade of the Philharmonie in Luxembourg |
Fassade Mark- Twain- Grundschule 02 |
Author | Kora27 | Ermell | ThoBel-0043 |
Score | 25 | 14 | 11 |
Congratulations to Kora27, Ermell and ThoBel-0043. -- Jarekt (talk) 00:34, 22 June 2024 (UTC)
Rank | 1 | 2 | 3 |
---|---|---|---|
image | |||
Title | Visitors at the 2024 Easter fire in Rottorf | Campfire at lake Yngen, Filipstad Municipality, Värmland, Sweden |
Osterfeuer im oberen Murtal |
Author | F. Riedelio | Mozzihh | Bitisajn |
Score | 21 | 14 | 10 |
Congratulations to F. Riedelio, Mozzihh and Bitisajn. -- Jarekt (talk) 00:46, 22 June 2024 (UTC)
- Thanks a lot! @Jarekt
- lg Bitisajn (talk) 12:07, 23 June 2024 (UTC)
Photo challenge May results
Rank | 1 | 2 | 3 |
---|---|---|---|
image | |||
Title | Australian Shepherd Dog | Hachi and Boy | Cat enjoying the sun between daisies |
Author | Ermell | HachiBoy | Lusi Lindwurm |
Score | 27 | 15 | 13 |
Congratulations to Ermell, HachiBoy and Lusi Lindwurm. -- Jarekt (talk) 01:06, 15 July 2024 (UTC)
Rank | 1 | 2 | 3 |
---|---|---|---|
image | |||
Title | This was shot in Kakinada Beach, shows struggle of fishermen in middle of sea |
A wave painted with a white neon lamp in a flashlight, city beach in Płock, Poland. |
Port Saint-Michel in Batz-sur-Mer |
Author | Zahed.zk | Lightpainterplock | Ibex73 |
Score | 28 | 19 | 11 |
Congratulations to Zahed.zk, Lightpainterplock and Ibex73. -- Jarekt (talk) 01:14, 15 July 2024 (UTC)
Photo challenge June results
Rank | 1 | 2 | 3 |
---|---|---|---|
image | |||
Title | Poisonous mushrooms against a forest in autumn, Wrzosów, Poland |
Mycena interrupta NZ | |
Author | Ivonna Nowicka | Famberhorst | Haydenrjones |
Score | 15 | 13 | 9 |
Congratulations to Ivonna Nowicka, Famberhorst and Haydenrjones. -- Jarekt (talk) 03:12, 21 August 2024 (UTC)
Rank | 1 | 2 | 3 |
---|---|---|---|
image | |||
Title | Carpenter working on a concrete formwork |
Workers attaching a chain to the Main bridge in Ebing |
Demolition site of the so-called Kaufhof store "Tortenschachtel" (cake box) on Berliner Platz |
Author | Ermell | Ermell | F. Riedelio |
Score | 17 | 14 | 11 |
Congratulations to Ermell, Ermell and F. Riedelio. -- Jarekt (talk) 03:30, 21 August 2024 (UTC)