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

object not callable #51

Open
JerryGeis opened this issue Nov 28, 2023 · 4 comments
Open

object not callable #51

JerryGeis opened this issue Nov 28, 2023 · 4 comments

Comments

@JerryGeis
Copy link

I am trying to use livefs-edit and get an error

livefs-edit ubuntu-22.04.3-live-server-amd64.iso test.iso --cp grub.cfg /boot/grub/grub.cfg
Traceback (most recent call last):
File "/usr/local/bin/livefs-edit", line 8, in
sys.exit(main())
TypeError: 'module' object is not callable

All I want to do is replace the grub.cfg file on the ubuntu live server cd.

I did "pip3 install livefs-editor", and then ran the above command.
What do I do with this error ?

Jerry

@JerryGeis
Copy link
Author

OK - I found something to help with the above error: Change /usr/local/bin/livefs-edit last line to this
sys.exit(main.main(sys.argv[1:]))

but now when I run I get this:

livefs-edit ubuntu-22.04.3-live-server-amd64.iso test.iso --cp grub.cfg /boot/grub/grub.cfg
running cp with arguments {'source': 'grub.cfg', 'dest': '/boot/grub/grub.cfg'}
Traceback (most recent call last):
File "/usr/local/bin/livefs-edit", line 8, in
sys.exit(main.main(sys.argv[1:]))
File "/usr/local/lib/python3.10/dist-packages/livefs_edit/main.py", line 66, in main
func(ctxt, **kw)
File "/usr/local/lib/python3.10/dist-packages/livefs_edit/actions.py", line 105, in cp
shutil.copy(ctxt.p(source), ctxt.p(dest))
File "/usr/lib/python3.10/shutil.py", line 417, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib/python3.10/shutil.py", line 254, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpzuccifq1/grub.cfg'

Jerry

@TechSupportJosh
Copy link

I was getting the same issue, but looks like calling it like this works:

python3 -m livefs_edit ./ubuntu-22.04.3-live-server-amd64.iso ./test.iso

@JerryGeis
Copy link
Author

I get this now.

python3 -m livefs_edit ./ubuntu-22.04.3-live-server-amd64.iso ./test.iso --cp /home/silentm/CDROM.iso/Ubuntu.22.04/grub.cfg /boot/grub/grub.cfg
running cp with arguments {'source': '/home/silentm/CDROM.iso/Ubuntu.22.04/grub.cfg', 'dest': '/boot/grub/grub.cfg'}
no changes!

and no test.iso

Jerry

@JerryGeis
Copy link
Author

If I remove the path - then I get an error

python3 -m livefs_edit ./ubuntu-22.04.3-live-server-amd64.iso ./test.iso --cp grub.cfg /boot/grub/grub.cfg
running cp with arguments {'source': 'grub.cfg', 'dest': '/boot/grub/grub.cfg'}
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.10/dist-packages/livefs_edit/main.py", line 75, in
main(sys.argv[1:])
File "/usr/local/lib/python3.10/dist-packages/livefs_edit/main.py", line 66, in main
func(ctxt, **kw)
File "/usr/local/lib/python3.10/dist-packages/livefs_edit/actions.py", line 105, in cp
shutil.copy(ctxt.p(source), ctxt.p(dest))
File "/usr/lib/python3.10/shutil.py", line 417, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib/python3.10/shutil.py", line 254, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpdpp3t2m6/grub.cfg'

Jerry

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

2 participants