Problem creating doctype

76 views
Skip to first unread message

Marta Ross

unread,
May 15, 2014, 7:38:37 AM5/15/14
to erpnext-dev...@googlegroups.com

Hello, I created an app called Billboard using frappe --make_app.
Created it OK and then installed using frappe --install_app.
When I try to create the docType im having the next error:

Traceback (most recent call last):
File "/usr/erpnext/14-05-bench/frappe/frappe/middlewares.py", line 15, in call
return super(StaticDataMiddleware, self).call(environ, start_response)
File "/usr/local/lib/python2.7/site-packages/Werkzeug-0.9.4-py2.7.egg/werkzeug/wsgi.py", line 579, incall
return self.app(environ, start_response)
File "/usr/local/lib/python2.7/site-packages/Werkzeug-0.9.4-py2.7.egg/werkzeug/wsgi.py", line 579, incall
return self.app(environ, start_response)
File "/usr/local/lib/python2.7/site-packages/Werkzeug-0.9.4-py2.7.egg/werkzeug/local.py", line 224, in application
return ClosingIterator(app(environ, start_response), self.cleanup)
File "/usr/local/lib/python2.7/site-packages/Werkzeug-0.9.4-py2.7.egg/werkzeug/wrappers.py", line 285, in application
return f(*args[:-2] + (request,))(*args[-2:])
File "/usr/erpnext/14-05-bench/frappe/frappe/app.py", line 46, in application
response = frappe.handler.handle()
File "/usr/erpnext/14-05-bench/frappe/frappe/handler.py", line 66, in handle
execute_cmd(cmd)
File "/usr/erpnext/14-05-bench/frappe/frappe/handler.py", line 84, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File "/usr/erpnext/14-05-bench/frappe/frappe/init.py", line 495, in call
return fn(*args, **newargs)
File "/usr/erpnext/14-05-bench/frappe/frappe/widgets/form/save.py", line 17, in savedocs
doc.save()
File "/usr/erpnext/14-05-bench/frappe/frappe/model/document.py", line 149, in save
self.insert()
File "/usr/erpnext/14-05-bench/frappe/frappe/model/document.py", line 140, in insert
self.run_post_save_methods()
File "/usr/erpnext/14-05-bench/frappe/frappe/model/document.py", line 397, in run_post_save_methods
self.run_method("on_update")
File "/usr/erpnext/14-05-bench/frappe/frappe/model/document.py", line 369, in run_method
return Document.hook(fn)(self, *args, **kwargs)
File "/usr/erpnext/14-05-bench/frappe/frappe/model/document.py", line 440, in composer
return composed(self, method, *args, **kwargs)
File "/usr/erpnext/14-05-bench/frappe/frappe/model/document.py", line 423, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/usr/erpnext/14-05-bench/frappe/frappe/model/document.py", line 367, in 
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/usr/erpnext/14-05-bench/frappe/frappe/core/doctype/doctype/doctype.py", line 91, in on_update
module = load_doctype_module(self.name, self.module)
File "/usr/erpnext/14-05-bench/frappe/frappe/modules/init.py", line 50, in load_doctype_module
return frappe.get_module(get_module_name(doctype, module, prefix))
File "/usr/erpnext/14-05-bench/frappe/frappe/init.py", line 362, in get_module
return importlib.import_module(modulename)
File "/usr/local/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/usr/erpnext/14-05-bench/billboard/billboard/billboard/doctype/000000001/000000001.py", line 8
class 000000001(Document):
^
SyntaxError: invalid syntax

When saving, i name the docType as tblName but for some reason when i go check @mysql the table is named as tab000000001 .
After that all kinds of strange behaviors seen with the module.

Thank you

Rushabh Mehta

unread,
May 15, 2014, 9:22:44 AM5/15/14
to erpnext-dev...@googlegroups.com
Seems your system is messed up because you changed the DocType DocType. DocTypes in Core module should not be changed ideally.

I would recommend you start fresh. See this for more help:

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/942f23e1-2c8c-431b-badf-05fe43743f2e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marta Ross

unread,
May 15, 2014, 11:03:11 AM5/15/14
to erpnext-dev...@googlegroups.com
Thank you Rushabh, but unfortunately its not the case.
Ive installed fresh from frappe-bench as per the developers guide. 
Then run scripts/update.sh.
Created the app but when save the doctype... same error.

:(

Anand Doshi

unread,
May 15, 2014, 1:24:25 PM5/15/14
to ERPNext Developer's Forum
Hi Marta,

Did you name your doctype as 00000001 by any chance?

Thanks,
Anand.


--
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...@googlegroups.com.

Anand Doshi

unread,
May 15, 2014, 1:25:50 PM5/15/14
to ERPNext Developer's Forum
Sorry. I am able to replicate the problem. Let me look into it.

Marta Ross

unread,
May 15, 2014, 1:35:28 PM5/15/14
to erpnext-dev...@googlegroups.com
Hi Anand, absolutely not. Named it tblBillboard. After I click "Save" it grays the screen and the green status bar on the top slowly (very) gets to the end and freezes there.
It'll keep there til i clear cache. The log i attached is from the frappe log.
You can try by installing a new frappe-bench , update and create the new app.


On Thursday, May 15, 2014 8:38:37 AM UTC-3, Marta Ross wrote:

Anand Doshi

unread,
May 15, 2014, 1:48:25 PM5/15/14
to ERPNext Developer's Forum
Hi Marta,

We've fixed this issue. Please update the bench.

Thanks,
Anand.


--
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...@googlegroups.com.

Marta Ross

unread,
May 15, 2014, 3:46:09 PM5/15/14
to erpnext-dev...@googlegroups.com
Worked like a charm. Thank you Anand!


On Thursday, May 15, 2014 8:38:37 AM UTC-3, Marta Ross wrote:
Reply all
Reply to author
Forward
0 new messages