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

AttributeError: module 'pytf2' has no attribute 'bp_user_info' #2

Closed
Enzotoy opened this issue Feb 26, 2020 · 2 comments
Closed

AttributeError: module 'pytf2' has no attribute 'bp_user_info' #2

Enzotoy opened this issue Feb 26, 2020 · 2 comments
Assignees
Labels

Comments

@Enzotoy
Copy link

Enzotoy commented Feb 26, 2020

Hello, i have this error:
image

and my code is :
`import pytf2

class initialisation:
def init(self, cache: bool=True, bp_api_key: str='', bp_user_token: str='', mp_api_key: str='', no_rate_limits: bool=False, bypass_cf: bool=False):
pass

class currency:
def pp_currency(keys, metal, key_name: str="key", metal_name: str="ref"):
pass

stemids = ''

info = pytf2.bp_user_info(self, steamids, parse=True)

`
Can you help me?

@mninc mninc self-assigned this Mar 2, 2020
@mninc mninc added the invalid label Mar 2, 2020
@mninc
Copy link
Owner

mninc commented Mar 2, 2020

Sorry, saw this when you posted it and forgot to reply. Initialise the module like in the readme, passing in your bp.tf api key:

import pytf2
tf2_manager = pytf2.Manager(bp_api_key="key")

then you can call the method:

info = tf2_manager.bp_user_info(["steamid"])

I'd recommend reading some tutorials on how to use classes, it seems like you're quite new to python.

@Enzotoy
Copy link
Author

Enzotoy commented Mar 5, 2020

Hello, ty for reply
Yes i'm new in python but i didn't understand how to use classes :(

@mninc mninc closed this as completed Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants