Closed Aliefe02 closed 11 months ago
So I believe this issue occurs because of the way it obtains the information. Python Steam API obtains the app details using json.request(), it then processes this information using json.load(). However json doesn't use True or False for boolean values, it uses true or false (no capitalization), that may be what is causing the error. I'll reply to this when I figure out a fix to this if you would like that.
Hello.
So I found the problem, the get_app_details() method returns json.dumps(json_loaded_response). The Issue isn't the way json and python write boolean values, it is this return function. json.dumps() returns a string, so even though it originally is a dictionary, it returns a string version of that dictionary. Removing json.dumps() from the return for the method fixes the issue.
This is the method
Remove json.dumps() and leave json_loaded_response, like this:
Then save the file, it should return a dictionary now.
If you have trouble finding the method, please feel free to contact me, but that solved it for me ^^
Thanks a lot
Thank you! If you want to create a PR and push, you can! Don't mind if people want to contribute. If not no worries! I will do it when I get home and update the package
Get Outlook for Androidhttps://aka.ms/AAb9ysg
From: Ali EFE @.> Sent: Wednesday, July 26, 2023 7:26:17 PM To: deivit24/python-steam-api @.> Cc: Subscribed @.***> Subject: Re: [deivit24/python-steam-api] steam.apps.get_app_details() returns string instead of dict (Issue #5)
Closed #5https://github.com/deivit24/python-steam-api/issues/5 as completed.
— Reply to this email directly, view it on GitHubhttps://github.com/deivit24/python-steam-api/issues/5#event-9929709385, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AISPR3HING3GU7AMJSLBJA3XSGRRTANCNFSM6AAAAAAYASSHHY. You are receiving this because you are subscribed to this thread.Message ID: @.***>
I'm rather new to github (just made my account right now to resolve this issue) so I'll try to do the pull request, however if I can't finish it by today then that would be great, thank you for providing me and everyone else with this API, it has helped a lot with my own project.
No worries! Thanks that means alot!
Get Outlook for Androidhttps://aka.ms/AAb9ysg
From: PsiPi-Codes @.> Sent: Wednesday, July 26, 2023 7:33:53 PM To: deivit24/python-steam-api @.> Cc: David Salazar @.>; Comment @.> Subject: Re: [deivit24/python-steam-api] steam.apps.get_app_details() returns string instead of dict (Issue #5)
I'm rather new to github (just made my account right now to resolve this issue) so I'll try to do the pull request, however if I can't finish it by today then that would be great, thank you for providing me and everyone else with this API, it has helped a lot with my own project.
— Reply to this email directly, view it on GitHubhttps://github.com/deivit24/python-steam-api/issues/5#issuecomment-1652683488, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AISPR3CYMAM437BX3FYROIDXSGSODANCNFSM6AAAAAAYASSHHY. You are receiving this because you commented.Message ID: @.***>
I believe I have sent the pull request, please tell me if it worked (this is my first time).
Will let you know when I get home (tomorrow)!
Get Outlook for Androidhttps://aka.ms/AAb9ysg
From: PsiPi-Codes @.> Sent: Wednesday, July 26, 2023 7:51:08 PM To: deivit24/python-steam-api @.> Cc: David Salazar @.>; Comment @.> Subject: Re: [deivit24/python-steam-api] steam.apps.get_app_details() returns string instead of dict (Issue #5)
I believe I have sent the pull request, please tell me if it worked (this is my first time).
— Reply to this email directly, view it on GitHubhttps://github.com/deivit24/python-steam-api/issues/5#issuecomment-1652695408, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AISPR3DGRM6DLPAVOBOF4GTXSGUOZANCNFSM6AAAAAAYASSHHY. You are receiving this because you commented.Message ID: @.***>
Got it! Thank you.
steam.apps.get_app_details() function was supposed to return a dict value but it returns a string. Format of the string is for dict (for example there are "{ }" and "path: ") however there are some problems. True and False values are written as true and false. No capital T and F. I think this causes function to return values as string instead of dict. when i copy the returned value and correct true and false values to True and False and give this data to a variable python recognizes it as a dictionary. Pls fix this issue i really need this API (It's great btw)