bobloy / Fox-V3

Cogs for Red-DiscordBot V3 by Bobloy
https://discord.gg/GET4DVk
GNU Affero General Public License v3.0
53 stars 91 forks source link

FIFO Load Problem #153

Closed givemhell closed 4 years ago

givemhell commented 4 years ago

After loading the fifo cog I get told "Failed to load the following package fifo" "Check your console or logs for details"

[2020-10-18 15:51:57] [ERROR] red: Package loading failed Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/redbot/core/core_commands.py", line 170, in _load await bot.load_extension(spec) File "/usr/local/lib/python3.8/dist-packages/redbot/core/bot.py", line 1104, in load_extension await lib.setup(self) File "/root/.local/share/Red-DiscordBot/data/start/cogs/CogManager/cogs/fifo/init.py", line 7, in setup await cog.initialize() File "/root/.local/share/Red-DiscordBot/data/start/cogs/CogManager/cogs/fifo/fifo.py", line 79, in initialize self.scheduler = AsyncIOScheduler(job_defaults=job_defaults, logger=schedule_log) File "/usr/lib/python3/dist-packages/apscheduler/schedulers/base.py", line 87, in init self.configure(gconfig, options) File "/usr/lib/python3/dist-packages/apscheduler/schedulers/base.py", line 126, in configure self._configure(config) File "/usr/lib/python3/dist-packages/apscheduler/schedulers/asyncio.py", line 48, in _configure super(AsyncIOScheduler, self)._configure(config) File "/usr/lib/python3/dist-packages/apscheduler/schedulers/base.py", line 697, in _configure self.timezone = astimezone(config.pop('timezone', None)) or get_localzone() File "/usr/lib/python3/dist-packages/tzlocal/unix.py", line 165, in get_localzone _cache_tz = _get_localzone() File "/usr/lib/python3/dist-packages/tzlocal/unix.py", line 58, in _get_localzone androidtz = subprocess.check_output(['getprop', 'persist.sys.timezone']).strip().decode() File "/usr/lib/python3.8/subprocess.py", line 411, in check_output return run(popenargs, stdout=PIPE, timeout=timeout, check=True, File "/usr/lib/python3.8/subprocess.py", line 489, in run with Popen(popenargs, kwargs) as process: File "/usr/lib/python3.8/subprocess.py", line 854, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'getprop'

bobloy commented 4 years ago

What is your OS and environment? This seems to be an issue with the tzlocal package

givemhell commented 4 years ago

That's a hard question to answer XD Linux kali 4.14.117-perf+ #1 SMP PREEMPT Fri Jul 24 00:54:34 CST 2020 aarch64

givemhell commented 4 years ago

Do you need more info from me?

bobloy commented 4 years ago

If I'm piecing this together correctly, you're running termux on Android. If that's the case, I'll be unable to debug this since it's an OS error and doesn't involve FIFO at all.

I recommend posting the error either on the termux app github or the tz local github

If you do find a fix, I'd be thankful if you posted it here for the next person that might run into this.

givemhell commented 4 years ago

I'm using nethunter I'm running redbot via my phone it works well with little to no incompatibilitys (I've only had a few cogs not work) however your right the problem stems from tz and I looked at it myself & it's the way it looks for the local time it's going to be a problem for my hardware so il give the tz github a try but I don't see this getting fixed unless they care to support the only guy running tz on his phone XD Or you use an alt method to pull it from android

But thanks for the help I may even have a friend try and write me a work around if he's willing to try if we figure it out I'm willing to give you the code for a fork

I'm also aware of the security risk Ive created running it on my phone but untill I get a vps or my server box up and running this will just have to do

Much love and thanks again for the help =]

posting this here just incase anyone else has the problem and wants to try and follow along on resolving the issue https://github.com/regebro/tzlocal/issues/102