Giter Site home page Giter Site logo

curseforge-api's Introduction

Hi there ๐Ÿ‘‹

  • ๐ŸŒฑ Iโ€™m currently learning: C++ programming
  • ๐Ÿ‘ฏ Iโ€™m looking to collaborate on: python-apps ( happy to help! )
  • ๐Ÿ“ซ How to reach me: [email protected]
  • ๐Ÿ˜„ Pronouns: I don't beleve in them (custom pronouns) lol (im a guy)
  • โšก Fun fact: I LOVE Shawarma

img img My ReadME Status

curseforge-api's People

Contributors

advik-b avatar david58 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

david58

curseforge-api's Issues

Getting started instructions fail

Tried the simple instructions for getting started and the .game(...) method always fails.

>>> from curseforge import CurseClient
>>> from dotenv import dotenv_values
>>> config = dotenv_values()
>>>
>>> curse = CurseClient(config['CURSEFORGE_API_KEY'])
>>> 
>>> curse.game(432)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Work\Gms\CurseForgeAPI\.venv\Lib\site-packages\curseforge\base.py", line 79, in game
    return CurseGame.from_dict(self.fetch(f"game/{game_id}"))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Work\Gms\CurseForgeAPI\.venv\Lib\site-packages\curseforge\classes\cursegame.py", line 23, in from_dict
    id=data.get("id"),
       ^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'
>>> 
>>> next(curse.games())
CurseGame(id=78135, name='Demeo', slug='demeo', assets=CurseGameAssets(icon_url='iconUrl', tile_url='tileUrl', cover_url='coverUrl'), status=6, api_status=None, date_modified=None)

Tried a number of game IDs, both with and without caching just in case. No luck.

As you can see the .games() call after it works, so the API key is working.

AttributeError

Traceback (most recent call last):
File "C:\Users\kiril\Desktop\MLP\main.py", line 17, in
minecraft = client.game(432) # 432 is the ID of Minecraft
^^^^^^^^^^^^^^^^
File "C:\Users\kiril\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\curseforge\base.py", line 65, in game
return CurseGame.from_dict(self.fetch(f"game/{game_id}"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\kiril\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\curseforge\classes\cursegame.py", line 23, in from_dict
id=data.get("id"),
^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'
NativeCommandExitException: Program "python.exe" ended with non-zero exit code: 1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.