Setup demo site with make_demo

Hi Guys:

How do I set up a demo site like the one on your corporate site demo.erpnext.com?  I installed erpnext no problem from Github. I noticed there's an app/utilities/demo directory so I tried executing: lib/wfn.py -- make_demo (and) lib/wfn.py -- make_demo_fresh

I got the following message (with the --make_demo switch):

ro...@erpnext-demo-server:/var/www/erpnext# lib/wnf.py --make_demo
2013-01-01
Message: u'[Link Validation] Could not find the following values: Company: Wind Power LLC, Fiscal Year: 2013.\n\t\t\tPlease correct and resave. Document Not Saved.'
Traceback (most recent call last):
  File "lib/wnf.py", line 590, in <module>
    run()
  File "lib/wnf.py", line 431, in run
    utilities.demo.make_demo.make()
  File "app/utilities/demo/make_demo.py", line 40, in make
    _simulate()
  File "app/utilities/demo/make_demo.py", line 74, in _simulate
    run_sales(current_date)
  File "app/utilities/demo/make_demo.py", line 85, in run_sales
    make_quotation(current_date)
  File "app/utilities/demo/make_demo.py", line 302, in make_quotation
    b.insert()
  File "/var/www/erpnext/lib/webnotes/model/bean.py", line 289, in insert
    return self.save()
  File "/var/www/erpnext/lib/webnotes/model/bean.py", line 326, in save
    self.prepare_for_save("save")
  File "/var/www/erpnext/lib/webnotes/model/bean.py", line 194, in prepare_for_save
    self.check_links()
  File "/var/www/erpnext/lib/webnotes/model/bean.py", line 171, in check_links
    Please correct and resave. Document Not Saved.""" % ', '.join(err_list), raise_exception=1)
  File "/var/www/erpnext/lib/webnotes/__init__.py", line 137, in msgprint
    _raise_exception()
  File "/var/www/erpnext/lib/webnotes/__init__.py", line 123, in _raise_exception
    raise ValidationError, msg
webnotes.ValidationError: [Link Validation] Could not find the following values: Company: Wind Power LLC, Fiscal Year: 2013.
Please correct and resave. Document Not Saved.

Any instructions on how to set up a demo site would be greatly appreciated.  It looks like it's all there, I'm just missing something,

Cheers,
Dave



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Seems like a recent issue - please raise an issue on GitHub.


On 24-Sep-2013, at 7:12 PM, Dave Cook <da...@gridworkz.com> wrote:

Hi Guys:

How do I set up a demo site like the one on your corporate site demo.erpnext.com?  I installed erpnext no problem from Github. I noticed there's an app/utilities/demo directory so I tried executing: lib/wfn.py -- make_demo (and) lib/wfn.py -- make_demo_fresh

I got the following message (with the --make_demo switch):

ro...@erpnext-demo-server:/var/www/erpnext# lib/wnf.py --make_demo
2013-01-01
Message: u'[Link Validation] Could not find the following values: Company: Wind Power LLC, Fiscal Year: 2013.\n\t\t\tPlease correct and resave. Document Not Saved.'
Traceback (most recent call last):
  File "lib/wnf.py", line 590, in <module>
    run()
  File "lib/wnf.py", line 431, in run
    utilities.demo.make_demo.make()
  File "app/utilities/demo/make_demo.py", line 40, in make
    _simulate()
  File "app/utilities/demo/make_demo.py", line 74, in _simulate
    run_sales(current_date)
  File "app/utilities/demo/make_demo.py", line 85, in run_sales
    make_quotation(current_date)
  File "app/utilities/demo/make_demo.py", line 302, in make_quotation
    b.insert()
  File "/var/www/erpnext/lib/webnotes/model/bean.py", line 289, in insert
    return self.save()
  File "/var/www/erpnext/lib/webnotes/model/bean.py", line 326, in save
    self.prepare_for_save("save")
  File "/var/www/erpnext/lib/webnotes/model/bean.py", line 194, in prepare_for_save
    self.check_links()
  File "/var/www/erpnext/lib/webnotes/model/bean.py", line 171, in check_links
    Please correct and resave. Document Not Saved.""" % ', '.join(err_list), raise_exception=1)
  File "/var/www/erpnext/lib/webnotes/__init__.py", line 137, in msgprint
    _raise_exception()
  File "/var/www/erpnext/lib/webnotes/__init__.py", line 123, in _raise_exception
    raise ValidationError, msg
webnotes.ValidationError: [Link Validation] Could not find the following values: Company: Wind Power LLC, Fiscal Year: 2013.
Please correct and resave. Document Not Saved.

Any instructions on how to set up a demo site would be greatly appreciated.  It looks like it's all there, I'm just missing something,

Cheers,
Dave




Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
Done - issue #893  https://github.com/webnotes/erpnext/issues/893

Cheers,
Dave

On Tuesday, September 24, 2013 9:42:58 AM UTC-4, Dave Cook wrote:
Hi Guys:

How do I set up a demo site like the one on your corporate site demo.erpnext.com?  I installed erpnext no problem from Github. I noticed there's an app/utilities/demo directory so I tried executing: lib/wfn.py -- make_demo (and) lib/wfn.py -- make_demo_fresh

I got the following message (with the --make_demo switch):

ro...@erpnext-demo-server:/var/www/erpnext# lib/wnf.py --make_demo
2013-01-01
Message: u'[Link Validation] Could not find the following values: Company: Wind Power LLC, Fiscal Year: 2013.\n\t\t\tPlease correct and resave. Document Not Saved.'
Traceback (most recent call last):
  File "lib/wnf.py", line 590, in <module>
    run()
  File "lib/wnf.py", line 431, in run
    utilities.demo.make_demo.make()
  File "app/utilities/demo/make_demo.py", line 40, in make
    _simulate()
  File "app/utilities/demo/make_demo.py", line 74, in _simulate
    run_sales(current_date)
  File "app/utilities/demo/make_demo.py", line 85, in run_sales
    make_quotation(current_date)
  File "app/utilities/demo/make_demo.py", line 302, in make_quotation
    b.insert()
  File "/var/www/erpnext/lib/webnotes/model/bean.py", line 289, in insert
    return self.save()
  File "/var/www/erpnext/lib/webnotes/model/bean.py", line 326, in save
    self.prepare_for_save("save")
  File "/var/www/erpnext/lib/webnotes/model/bean.py", line 194, in prepare_for_save
    self.check_links()
  File "/var/www/erpnext/lib/webnotes/model/bean.py", line 171, in check_links
    Please correct and resave. Document Not Saved.""" % ', '.join(err_list), raise_exception=1)
  File "/var/www/erpnext/lib/webnotes/__init__.py", line 137, in msgprint
    _raise_exception()
  File "/var/www/erpnext/lib/webnotes/__init__.py", line 123, in _raise_exception
    raise ValidationError, msg
webnotes.ValidationError: [Link Validation] Could not find the following values: Company: Wind Power LLC, Fiscal Year: 2013.
Please correct and resave. Document Not Saved.

Any instructions on how to set up a demo site would be greatly appreciated.  It looks like it's all there, I'm just missing something,

Cheers,
Dave



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
So I made the demo install work by doing the following:

1) Edit: app/utilities/demo/demo_docs/Fiscal_Year.csv and added the following to the bottom

    ,,2012,01-Jan-2012,No
    ,,2013,01-Jan-2013,No

    This gets the fiscal year loading properly for 2013 during install.

2) In the erpnext root directory I added this to conf.py (under the database config section)

    demo_db_name = "demo"

3) I ran the demo install from the erpnext root directory:

    python app/utilities/demo/make_erpnext_demo.py

Viola! it did it's thing.  Now, how do I get to the demo?  What URL do I need to enter into the browser?

Cheers,
Dave


On Tuesday, September 24, 2013 3:40:38 PM UTC-4, Dave Cook wrote:
Done - issue #893  https://github.com/webnotes/erpnext/issues/893

Cheers,
Dave

On Tuesday, September 24, 2013 9:42:58 AM UTC-4, Dave Cook wrote:
Hi Guys:

How do I set up a demo site like the one on your corporate site demo.erpnext.com?  I installed erpnext no problem from Github. I noticed there's an app/utilities/demo directory so I tried executing: lib/wfn.py -- make_demo (and) lib/wfn.py -- make_demo_fresh

I got the following message (with the --make_demo switch):

ro...@erpnext-demo-server:/var/www/erpnext# lib/wnf.py --make_demo
2013-01-01
Message: u'[Link Validation] Could not find the following values: Company: Wind Power LLC, Fiscal Year: 2013.\n\t\t\tPlease correct and resave. Document Not Saved.'
Traceback (most recent call last):
  File "lib/wnf.py", line 590, in <module>
    run()
  File "lib/wnf.py", line 431, in run
    utilities.demo.make_demo.make()
  File "app/utilities/demo/make_demo.py", line 40, in make
    _simulate()
  File "app/utilities/demo/make_demo.py", line 74, in _simulate
    run_sales(current_date)
  File "app/utilities/demo/make_demo.py", line 85, in run_sales
    make_quotation(current_date)
  File "app/utilities/demo/make_demo.py", line 302, in make_quotation
    b.insert()
  File "/var/www/erpnext/lib/webnotes/model/bean.py", line 289, in insert
    return self.save()
  File "/var/www/erpnext/lib/webnotes/model/bean.py", line 326, in save
    self.prepare_for_save("save")
  File "/var/www/erpnext/lib/webnotes/model/bean.py", line 194, in prepare_for_save
    self.check_links()
  File "/var/www/erpnext/lib/webnotes/model/bean.py", line 171, in check_links
    Please correct and resave. Document Not Saved.""" % ', '.join(err_list), raise_exception=1)
  File "/var/www/erpnext/lib/webnotes/__init__.py", line 137, in msgprint
    _raise_exception()
  File "/var/www/erpnext/lib/webnotes/__init__.py", line 123, in _raise_exception
    raise ValidationError, msg
webnotes.ValidationError: [Link Validation] Could not find the following values: Company: Wind Power LLC, Fiscal Year: 2013.
Please correct and resave. Document Not Saved.

Any instructions on how to set up a demo site would be greatly appreciated.  It looks like it's all there, I'm just missing something,

Cheers,
Dave



Note:

 

If you are posting an issue,

  1. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  3. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.

I get this error when I run “bench make-demo”

bench make-demo
Traceback (most recent call last):
File “/usr/lib/python3.6/runpy.py”, line 193, in _run_module_as_main
main”, mod_spec)
File “/usr/lib/python3.6/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/home/chimso/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
main()
File “/home/chimso/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/chimso/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/chimso/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/chimso/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/chimso/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/chimso/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/chimso/frappe-bench/env/lib/python3.6/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/chimso/frappe-bench/env/lib/python3.6/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/chimso/frappe-bench/apps/frappe/frappe/commands/init.py”, line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/chimso/frappe-bench/apps/erpnext/erpnext/commands/init.py”, line 44, in make_demo
from erpnext.demo import demo
File “/home/chimso/frappe-bench/apps/erpnext/erpnext/demo/demo.py”, line 6, in
from erpnext.demo.user import hr, sales, purchase, manufacturing, stock, accounts, projects, fixed_asset
File “/home/chimso/frappe-bench/apps/erpnext/erpnext/demo/user/fixed_asset.py”, line 9, in
from erpnext.assets.doctype.asset.asset import make_purchase_invoice, make_sales_invoice
ImportError: cannot import name ‘make_purchase_invoice’

Hey @Obinna_Ukwueze, Did the error resolved?
If yes, can you provide the steps you did to resolve it?

Thanks

@Obinna_Ukwueze
Can you please share if the issue was resolved? If yes, request you to share the steps if possible.
I too am facing the same error.

hi. Can you please share if the issue was resolved?

Sorry for the late response but this was never resolved.

1 Like