Unable to Create an App

i am trying to create an App but i am getting this error;

Command “python setup.py egg_info” failed with error code 1 in /home/frappe/frappe-bench/apps/crook/
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/.bench/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/make.py”, line 48, in new_app
new_app(app_name)
File “/home/frappe/.bench/bench/app.py”, line 156, in new_app
install_app(app, bench_path=bench_path)
File “/home/frappe/.bench/bench/app.py”, line 167, in install_app
find_links=find_links))
File “/home/frappe/.bench/bench/utils.py”, line 153, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install -q -e ./apps/crook --no-cache-dir

Any help please

Hello @kolotayo

Can you share more details ? I didn’t understand which steps you are followed and getting error.

Thanks

Can you also share your frappe version and the command/s that you executed?

By the way, is there an app with a similar name in you apps/ folder?

Thanks

bench new-app crook
and i follow the prompt

App Title (default: Crook): Crook
App Description: To Setup Customer Details
App Publisher: frappe
App Email: tayo@creed.com
App Icon (default ‘octicon octicon-file-directory’):
App Color (default ‘grey’):
App License (default ‘MIT’): MIT

The Error pops up immediately after this line as below;

‘crook’ created at /home/frappe/frappe-bench/apps/crook
INFO:bench.app:installing crook
INFO:bench.utils:./env/bin/pip install -q -e ./apps/crook --no-cache-dir
Command “python setup.py egg_info” failed with error code 1 in /home/frappe/frappe-bench/apps/crook/

@kolotayo

I think the correct command should be bench new-app app_name or in your case:

bench new-app crook

Before you try it again, you might want to delete the crook folder in apps/ and remove crook if it’s in the apps.txt file located at frappe-bench/sites.

This is the same command i used.
bench new-app crook

And i have tried creating a new app with different name but the same error.
i dont know why its like this but i created an App myself last week and its working fine.

Did you run bench update before today? Can we know the bench, frappe and erpnext branches and versions?

Hi @kolotayo,

I had the same symptoms when trying to create a new app last week in a current (v10.1 master) version in a develop instance. When I created the app on a production instance, it worked fine.

Are you using a develop or production instance?

i am using Develop Instance.
But i have been creating apps on it which works perfectly

Yes i Ran bench update twice yesterday before creating the new App
Frappe: v10.1.32
ErpNext: v10.1.34

Are you on develop branch? If yes, can you try switching to the Master Branch to check if it fixes the problem?

I had also this issue and I see in setup.py file generated in my app a line with a \n parsed

install_requires = f.read().strip().split('
')

instead of

install_requires = f.read().strip().split('\n')

I think it’s in line 275 from frappe/utils/boilerplate.py

with open('requirements.txt') as f:
install_requires = f.read().strip().split('\\n')

But I’m not sure so if a developer could try it since it seems no buggy here.

Regards

2 Likes

After checking in master branch the line 273 is :

install_requires = f.read().strip().split('\n')

So here is the bug.

3 Likes