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

astlog not working in MacOS environments #5

Open
m0nt3cr1st0 opened this issue Apr 3, 2024 · 0 comments
Open

astlog not working in MacOS environments #5

m0nt3cr1st0 opened this issue Apr 3, 2024 · 0 comments

Comments

@m0nt3cr1st0
Copy link

Hello!

First of all thanks for your amazing tool, it has made my life way easier :)

I recently switched to a MacOS environment and when I try to use the tool I get an error about a file missing:

(astlog) gonzalo@XXXX ~ % astlog $PWD/sip.log
Traceback (most recent call last):
  File "/Users/gonzalo/astlog/astlog/app.py", line 1112, in run
    self.loop.run()
  File "/Users/gonzalo/.virtualenvs/astlog/lib/python3.9/site-packages/urwid-2.6.10-py3.9.egg/urwid/event_loop/main_loop.py", line 337, in run
    self._run()
  File "/Users/gonzalo/.virtualenvs/astlog/lib/python3.9/site-packages/urwid-2.6.10-py3.9.egg/urwid/event_loop/main_loop.py", line 439, in _run
    self.event_loop.run()
  File "/Users/gonzalo/.virtualenvs/astlog/lib/python3.9/site-packages/urwid-2.6.10-py3.9.egg/urwid/event_loop/select_loop.py", line 182, in run
    self._loop()
  File "/Users/gonzalo/.virtualenvs/astlog/lib/python3.9/site-packages/urwid-2.6.10-py3.9.egg/urwid/event_loop/select_loop.py", line 224, in _loop
    alarm_callback()
  File "/Users/gonzalo/.virtualenvs/astlog/lib/python3.9/site-packages/urwid-2.6.10-py3.9.egg/urwid/event_loop/main_loop.py", line 218, in cb
    callback(self, user_data)
  File "/Users/gonzalo/astlog/astlog/app.py", line 1110, in <lambda>
    self.loop.set_alarm_in(0, lambda loop, data: self.reload_file())
  File "/Users/gonzalo/astlog/astlog/app.py", line 1035, in reload_file
    self.parser.load_file(progress)
  File "/Users/gonzalo/astlog/astlog/reader.py", line 559, in load_file
    data = self.read_data()
  File "/Users/gonzalo/astlog/astlog/reader.py", line 548, in read_data
    mem_size = get_memory_size()
  File "/Users/gonzalo/astlog/astlog/reader.py", line 1449, in get_memory_size
    with open('/proc/meminfo') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/proc/meminfo'

I suspect this has to do with the get_memory_size method:

Given that MacOS does not use /proc/ :

  • is there any way to circumvent this memory size check?
  • Alternatively, can we add support for it? -> Do you accept external PRs? I would not mind to try to fix it myself!

Best,

grubio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant