mewhrzad / marzpy

A Python library that helps you easily use Marzban's API panel
MIT License
98 stars 27 forks source link

note در آپدیت جدید #4

Closed IAmRealSaeed closed 7 months ago

IAmRealSaeed commented 11 months ago

سلام. اکثر فانکشن های پکیج این ارور رو دریافت میکنند. TypeError: init() got an unexpected keyword argument 'note' فکر میکنم بخاطر آپدیت جدید پنل مرزبان باشه.

mewhrzad commented 11 months ago

سلام نمونه کد بفرستید تا برسی کنم

amiralifateri commented 11 months ago

با تغییر کلاس User در فایل user.py پوشه api مشکل تا حد زیادی برطرف میشه

class User:
    def __init__(
        self,
        username: str,
        proxies: dict,
        inbounds: dict,
        expire: float,
        data_limit: float,
        data_limit_reset_strategy: str,
        status="active",
        used_traffic=0,
        lifetime_used_traffic=0,
        created_at="",
        links=[],
        subscription_url="",
        excluded_inbounds={},
        note="",
        sub_updated_at=0,
        sub_last_user_agent="",
        online_at=0,
        on_hold_expire_duration=0,
        on_hold_timeout="null",

    ):
        self.username = username
        self.proxies = proxies
        self.inbounds = inbounds
        self.expire = expire
        self.data_limit = data_limit
        self.data_limit_reset_strategy = data_limit_reset_strategy
        self.status = status
        self.used_traffic = used_traffic
        self.lifetime_used_traffic = lifetime_used_traffic
        self.created_at = created_at
        self.links = links
        self.subscription_url = subscription_url
        self.excluded_inbounds = excluded_inbounds
        self.note = note
        self.sub_updated_at = sub_updated_at
        self.sub_last_user_agent = sub_last_user_agent
        self.online_at = online_at
        self.on_hold_expire_duration = on_hold_expire_duration
        self.on_hold_timeout = on_hold_timeout
ultraleks commented 10 months ago

I got same error. Author, can you fix this error in code in repository?

mewhrzad commented 7 months ago

با تغییر کلاس User در فایل user.py پوشه api مشکل تا حد زیادی برطرف میشه

class User:
    def __init__(
        self,
        username: str,
        proxies: dict,
        inbounds: dict,
        expire: float,
        data_limit: float,
        data_limit_reset_strategy: str,
        status="active",
        used_traffic=0,
        lifetime_used_traffic=0,
        created_at="",
        links=[],
        subscription_url="",
        excluded_inbounds={},
        note="",
        sub_updated_at=0,
        sub_last_user_agent="",
        online_at=0,
        on_hold_expire_duration=0,
        on_hold_timeout="null",

    ):
        self.username = username
        self.proxies = proxies
        self.inbounds = inbounds
        self.expire = expire
        self.data_limit = data_limit
        self.data_limit_reset_strategy = data_limit_reset_strategy
        self.status = status
        self.used_traffic = used_traffic
        self.lifetime_used_traffic = lifetime_used_traffic
        self.created_at = created_at
        self.links = links
        self.subscription_url = subscription_url
        self.excluded_inbounds = excluded_inbounds
        self.note = note
        self.sub_updated_at = sub_updated_at
        self.sub_last_user_agent = sub_last_user_agent
        self.online_at = online_at
        self.on_hold_expire_duration = on_hold_expire_duration
        self.on_hold_timeout = on_hold_timeout

در آپدیت جدید نسخه 0.0.3 این مشکلات برطرف شدن