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

Init fails #46

Closed
sirtimbly opened this issue Apr 29, 2022 · 5 comments
Closed

Init fails #46

sirtimbly opened this issue Apr 29, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@sirtimbly
Copy link

macOS - M1 Max
installed with pip
Python 3.9.12

lak --help returns help correctly.

lak init fails after a couple of seconds... printing Aborted! and attempting to open a editor to editor-{RANDOM}.txt

I'm not a python developer but I have to run a few other python CLI tools from time to time.

@sarvjeets sarvjeets self-assigned this Apr 30, 2022
@sarvjeets sarvjeets added the bug Something isn't working label Apr 30, 2022
@sarvjeets
Copy link
Owner

Thanks for reporting this. I'll try to replicate this on macOS.

Background:
Internally, Lakshmi depends on click to edit files and most probably click is failing while launching the editor on macOS to create the portfolio file.

@sarvjeets
Copy link
Owner

I wasn't able to reproduce this on macOS 12.3.1, Python version 3.10.4

Could you verify if click is working fine independently of lakshmi? I believe the following should fail as well on your system (in Terminal):

$ python  # or python3
>>> import click
>>> click.edit('Test')

My current hypothesis is that somehow click is trying to open an editor on your system that is not working. Could you try this on your terminal and paste the output here:

$ echo $EDITOR

Perhaps the following workaround might work for you:

# Check if your editor is working. vim or nano should be installed on your system:
$ nano   # or vim
# Quit nano

$ export EDITOR=nano
$ lak init   # This should open nano to setup your portfolio.

@sarvjeets
Copy link
Owner

Any luck trying those suggestions?

@sirtimbly
Copy link
Author

sirtimbly commented May 5, 2022 via email

@sarvjeets
Copy link
Owner

Thanks for the update. I'm glad that it's working.

I hope you find Lakshmi useful. Closing this issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants