Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with dynmap - TypeError: 'NoneType' object is not iterable #82

Open
brianmay opened this issue Jun 14, 2024 · 1 comment
Open
Labels
Bug Something isn't working

Comments

@brianmay
Copy link

Describe the bug
Error when trying to check Dynmap for updates.

To Reproduce
Steps to reproduce the behavior:

  1. get dynmap
  2. check Dynmap
  3. See error

Expected behavior
No error.

Screenshots

I added a print to show the URL it is retreiving:

pluGET >> get dynmap
Searching for dynmap...
Found plugins:
 No.  Name                          Downloads  Description
   1  Dynmap                           984503  Dynamic 'Google Maps' style web maps for your Spigot/Bukkit server
   2  LiveAtlas                         22744  An alternative map UI for Dynmap, Squaremap and Overviewer. Supports
                                               multiple servers in one UI.
   3  Plot2Dynmap                       11813  PlotSquared dynmap extension
   4  EP-Dynmap-Towny                    4835  Dynmap-Towny provides a simple way to add visibility of Towny towns and
                                               nations on Dynmap's maps
   5  Dynmap-Multiserver                 4770  Merge your Dynmap together into one big map
   6  GriefPreventionDynmapSupport       4508  Claim markers on your Dynmap...
   7  JDynmapGriefPrevention             4451  GriefPrevention Addon with Dynmap Support (MC1.4.7 - MC1.19)
   8  Dynmap-Faction3                    4379  Plugin for dynmap to show factions.
   9  dynmap-structures                  3257  Shows your world's structures (such as Villages, Strongholds, and
                                               Pyramids) on Dynmap.
  10  Dynmap-GriefPrevention             3056  Adds GriefPrevention Claims To Dynmap
Select your wanted resource (No.)(0 to exit): 1

 ● Dynmap latest

    Downloaded         file → /home/brian/server_plugins/Dynmap-v3.7-beta-5.jar

'STRG + C' to exit
pluGET >> check Dynmap
get_plugin_file_version endswith .
https://api.spiget.org/v2/search/resources/Dynmap-v7-beta-5.jar?field=name&sort=-downloads
Checking... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╺━━  93% -:--:--Error: Couldn't parse json of webrequest
Traceback (most recent call last):
  File "/home/brian/mc/pluGET/./pluget.py", line 45, in <module>
    handle_input()
  File "/home/brian/mc/pluGET/src/handlers/handle_input.py", line 85, in handle_input
    check_installed_plugins(input_selected_object, input_parameter)
  File "/home/brian/mc/pluGET/src/plugin/plugin_updatechecker.py", line 341, in check_installed_plugins
    plugin_count, plugins_with_udpates = check_update_available_installed_plugins(input_selected_object, config_values)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/brian/mc/pluGET/src/plugin/plugin_updatechecker.py", line 316, in check_update_available_installed_plugins
    plugin_spigot_id = search_plugin_spiget(plugin_file, plugin_file_name, plugin_file_version) # plugin_spigot_id isn't needed
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/brian/mc/pluGET/src/plugin/plugin_updatechecker.py", line 556, in search_plugin_spiget
    for plugin in plugin_list:
TypeError: 'NoneType' object is not iterable
[nix-shell:~/mc/pluGET]$ wget 'https://api.spiget.org/v2/search/resources/Dynmap-v7-beta-5.jar?field=name&sort=-downloads'
--2024-06-15 09:50:22--  https://api.spiget.org/v2/search/resources/Dynmap-v7-beta-5.jar?field=name&sort=-downloads
Resolving api.spiget.org (api.spiget.org)... 2606:4700:20::6819:a28, 2606:4700:20::6819:928, 2606:4700:20::ac43:63e9, ...
Connecting to api.spiget.org (api.spiget.org)|2606:4700:20::6819:a28|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2024-06-15 09:50:23 ERROR 404: Not Found.

I think the correct URL is:

[nix-shell:~/mc/pluGET]$ wget 'https://api.spiget.org/v2/search/resources/Dynmap?field=name&sort=-downloads'
--2024-06-15 09:50:17--  https://api.spiget.org/v2/search/resources/Dynmap?field=name&sort=-downloads
Resolving api.spiget.org (api.spiget.org)... 2606:4700:20::6819:a28, 2606:4700:20::ac43:63e9, 2606:4700:20::6819:928, ...
Connecting to api.spiget.org (api.spiget.org)|2606:4700:20::6819:a28|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 98200 (96K) [application/json]
Saving to: ‘Dynmap?field=name&sort=-downloads’

Dynmap?field=name&sort=-downl 100%[================================================>]  95.90K  --.-KB/s    in 0.04s

2024-06-15 09:50:17 (2.16 MB/s) - ‘Dynmap?field=name&sort=-downloads’ saved [98200/98200]

Desktop (please complete the following information):

  • OS: NixOs 24.05
@brianmay brianmay added the Bug Something isn't working label Jun 14, 2024
@brianmay
Copy link
Author

Forgot to say: This is with latest git master version.

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

No branches or pull requests

1 participant