fjwillemsen / Apple-Store-Stock-Notifier

Apple Store Stock Notifier monitors the availability of selected Apple devices in selected Apple stores, and sends you a notification when devices are available!
MIT License
51 stars 10 forks source link

Error running store_checker #3

Closed Fiberopt1986 closed 2 years ago

Fiberopt1986 commented 2 years ago

I get:

line 373 in store_checker = StoreChecker() TypeError: StoreChecker.Init() missing 1 required positional argument: 'username'

I installed all dependencies. This is when i run the store_checker script, and all the config parameters are programmed.

This is all from ubuntu 22.04.1 LTS (Desktop)

fjwillemsen commented 2 years ago

Hi @Fiberopt1986, it looks like you are trying to run store_checker.py directly. You're supposed to run via monitor.py, which on line 75 invokes StoreChecker with the correct arguments. Just run python monitor.py as it says in the readme.

Fiberopt1986 commented 2 years ago

Thanks,

Let me back up. I did run the monitor.py file, and i had some errors initially there, and that is why i was trying to invoke the store checker to skip the telegram piece, as i thought it was a telegram issue. Now that I know that you cannot do that, here is the issue i have when running the monitor.py file:

I get the following errors:

New monitoring session! IP address: 192.168.190.129 Traceback (most recent call last): File "/home/username/Apple Notifier Scripts/Apple-Store-Stock-Notifier/monitor.py", line 350, in monitor = Monitor() File "/home/username/Apple Notifier Scripts/Apple-Store-Stock-Notifier/monitor.py", line 170, in init client.loop.run_until_complete(self.start_monitoring(client)) File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete return future.result() File "/home/username/Apple Notifier Scripts/Apple-Store-Stock-Notifier/monitor.py", line 180, in start_monitoring await send(client, message) File "/home/username/Apple Notifier Scripts/Apple-Store-Stock-Notifier/utils.py", line 20, in send await client.send_message(username, message) File "/home/username/.local/lib/python3.10/site-packages/telethon/client/messages.py", line 853, in send_message result = await self(request) File "/home/username/.local/lib/python3.10/site-packages/telethon/client/users.py", line 30, in call return await self._call(self._sender, request, ordered=ordered) File "/home/username/.local/lib/python3.10/site-packages/telethon/client/users.py", line 79, in _call result = await future telethon.errors.rpcerrorlist.UserIsBotError: Bots can't send messages to other bots (caused by SendMessageRequest)

That last error. I am definitely not sending from a bot to another bot. My username is my regular telegram username (tried with @ and without @), and the API_ID / hash was generated under the api section of my account. The bot_token was the token that was provided when creating the bot.

I also tried removing the *.session files with no luck.

Lastly, I also tried creating a completely different account with different phone number for the bot, so that i can validate 100% that the bot and my user was under a different account, and i got the same error.