Unable to load module error

Hello All,
   I have created a cgi fun  doctype ( is Single)  in selling module and wrote some code . I have create one cgi.  from that cgi i call method in cgi fun doctype. when i call cgi with mozila firefox poster  receives following error

Traceback (most recent call last):
  File “/var/www/sites/mtnadvantage.xbs360.com/public/status.cgi”, line 26, in <module>
    m=get_obj(‘cgi fun’).cstatus(argjson[‘ponumber’],argjson[‘status’])
  File “…/lib/webnotes/model/code.py”, line 161, in get_obj
    return get_server_obj(doclist[0], doclist)
  File “…/lib/webnotes/model/code.py”, line 107, in get_server_obj
    DocType = get_doctype_class(doc.doctype, module)
  File “…/lib/webnotes/model/code.py”, line 129, in get_doctype_class
    raise Exception, “Unable to load module for :” + doctype
Exception: Unable to load module for :cgi fun

what should i do?

Thank you



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.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/npqS3JAogbEJ.

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

 

 

Gangadhar,

Please paste your code along with the exception. Otherwise we have no idea what you are doing. Ideally use gist or pastebin for the same.

Any special reason you are using get_obj? You can directly call the python method.

- Rushabh


W: https://erpnext.com
T: @rushabh_mehta

On 23-Apr-2013, at 10:14 AM, gangadhar kadam <em...@gmail.com> wrote:

Hello All,
   I have created a cgi fun  doctype ( is Single)  in selling module and wrote some code . I have create one cgi.  from that cgi i call method in cgi fun doctype. when i call cgi with mozila firefox poster  receives following error

Traceback (most recent call last):
  File "/var/www/sites/mtnadvantage.xbs360.com/public/status.cgi", line 26, in &lt;module&gt;
    m=get_obj('cgi fun').cstatus(argjson['ponumber'],argjson['status'])
  File "../lib/webnotes/model/code.py", line 161, in get_obj
    return get_server_obj(doclist[0], doclist)
  File "../lib/webnotes/model/code.py", line 107, in get_server_obj
    DocType = get_doctype_class(doc.doctype, module)
  File "../lib/webnotes/model/code.py", line 129, in get_doctype_class
    raise Exception, "Unable to load module for :" + doctype
Exception: Unable to load module for :cgi fun

what should i do?

Thank you



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.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/npqS3JAogbEJ.

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

 

 




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.

To post to this group, send email to er...@googlegroups.com.

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

 

 

Hello Sir,
I have pasted my code on http://pastebin.com/0Vbevc7S
Thank you sir


On 23 April 2013 10:18, Rushabh Mehta <rm...@gmail.com> wrote:
Gangadhar,

Please paste your code along with the exception. Otherwise we have no idea what you are doing. Ideally use gist or pastebin for the same.

Any special reason you are using get_obj? You can directly call the python method.

- Rushabh


W: https://erpnext.com
T: @rushabh_mehta

On 23-Apr-2013, at 10:14 AM, gangadhar kadam <em...@gmail.com> wrote:

Hello All,
I have created a cgi fun doctype ( is Single) in selling module and wrote some code . I have create one cgi. from that cgi i call method in cgi fun doctype. when i call cgi with mozila firefox poster receives following error

Traceback (most recent call last):
File "/var/www/sites/mtnadvantage.xbs360.com/public/status.cgi", line 26, in &lt;module&gt;
m=get_obj('cgi fun').cstatus(argjson['ponumber'],argjson['status'])
File "../lib/webnotes/model/code.py", line 161, in get_obj
return get_server_obj(doclist[0], doclist)
File "../lib/webnotes/model/code.py", line 107, in get_server_obj
DocType = get_doctype_class(doc.doctype, module)
File "../lib/webnotes/model/code.py", line 129, in get_doctype_class
raise Exception, "Unable to load module for :" + doctype
Exception: Unable to load module for :cgi fun

what should i do?

Thank you



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.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/npqS3JAogbEJ.

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







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.

To post to this group, send email to er…@googlegroups.com.

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







--
Thanks & Regards,
Mr.Gangadhar N.Kadam.
Cell: +91 9960066444
Software Engineer,
New Indictrans Technologies Pvt. Ltd., Pune


P SAVE TREES - Please consider the environment before printing this email.

SAVE ENERGY - My monitor is off whenever I am away from my desk. I am helping prevent global warming by reducing consumption of power... ARE YOU?



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.

To post to this group, send email to er...@googlegroups.com.

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

 

 

Why do you need the DocType "cgi fun"? You can add the function in your file itself.

- Rushabh

(please don't address as "sir")


W: https://erpnext.com
T: @rushabh_mehta

On 23-Apr-2013, at 10:44 AM, गंगाधर कदम <em...@gmail.com> wrote:

Hello Sir,
I have pasted my code on  http://pastebin.com/0Vbevc7S
Thank you sir


On 23 April 2013 10:18, Rushabh Mehta <rm...@gmail.com> wrote:
Gangadhar,

Please paste your code along with the exception. Otherwise we have no idea what you are doing. Ideally use gist or pastebin for the same.

Any special reason you are using get_obj? You can directly call the python method.

- Rushabh


W: https://erpnext.com
T: @rushabh_mehta

On 23-Apr-2013, at 10:14 AM, gangadhar kadam <em...@gmail.com> wrote:

Hello All,
   I have created a cgi fun  doctype ( is Single)  in selling module and wrote some code . I have create one cgi.  from that cgi i call method in cgi fun doctype. when i call cgi with mozila firefox poster  receives following error

Traceback (most recent call last):
  File "/var/www/sites/mtnadvantage.xbs360.com/public/status.cgi", line 26, in &lt;module&gt;
    m=get_obj('cgi fun').cstatus(argjson['ponumber'],argjson['status'])
  File "../lib/webnotes/model/code.py", line 161, in get_obj
    return get_server_obj(doclist[0], doclist)
  File "../lib/webnotes/model/code.py", line 107, in get_server_obj
    DocType = get_doctype_class(doc.doctype, module)
  File "../lib/webnotes/model/code.py", line 129, in get_doctype_class
    raise Exception, "Unable to load module for :" + doctype
Exception: Unable to load module for :cgi fun

what should i do?

Thank you



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.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/npqS3JAogbEJ.

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

 

 





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.

To post to this group, send email to er…@googlegroups.com.

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

 

 




--
Thanks & Regards,
Mr.Gangadhar N.Kadam.
Cell: +91 9960066444
Software Engineer,
New Indictrans Technologies Pvt. Ltd., Pune

SAVE TREES - Please consider the environment before printing this email.
SAVE ENERGY - My monitor is off whenever I am away from my desk. I am helping  prevent global warming by reducing consumption of power... ARE YOU?



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.

To post to this group, send email to er…@googlegroups.com.

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

 

 




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.

To post to this group, send email to er...@googlegroups.com.

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

 

 

I have to synchronize two databases. in one database i call cgi with post parameters in other database, the cgi call the method of same database having code to synchronize status of sales order.
can i create an instance of doctype in cgi like

s=Document('Sales Order',SO00001)
s.status='test'
s.save()

Thank you


On 23 April 2013 11:27, Rushabh Mehta <rm...@gmail.com> wrote:
Why do you need the DocType "cgi fun"? You can add the function in your file itself.

- Rushabh

(please don't address as "sir")


W: https://erpnext.com
T: @rushabh_mehta

On 23-Apr-2013, at 10:44 AM, गंगाधर कदम <em...@gmail.com> wrote:

Hello Sir,
I have pasted my code on http://pastebin.com/0Vbevc7S
Thank you sir


On 23 April 2013 10:18, Rushabh Mehta <rm...@gmail.com> wrote:
Gangadhar,

Please paste your code along with the exception. Otherwise we have no idea what you are doing. Ideally use gist or pastebin for the same.

Any special reason you are using get_obj? You can directly call the python method.

- Rushabh

On 23-Apr-2013, at 10:14 AM, gangadhar kadam <em...@gmail.com> wrote:

Hello All,
I have created a cgi fun doctype ( is Single) in selling module and wrote some code . I have create one cgi. from that cgi i call method in cgi fun doctype. when i call cgi with mozila firefox poster receives following error


Traceback (most recent call last):
File “/var/www/sites/mtnadvantage.xbs360.com/public/status.cgi”, line 26, in &lt;module&gt;

m=get_obj(&#39;cgi fun&#39;).cstatus(argjson[&#39;ponumber&#39;],argjson[&#39;status&#39;])<br>  File &quot;../lib/webnotes/model/code.py&quot;, line 161, in get_obj<br>    return get_server_obj(doclist[0], doclist)<br>

File "…/lib/webnotes/model/code.py", line 107, in get_server_obj
DocType = get_doctype_class(doc.doctype, module)
File "…/lib/webnotes/model/code.py", line 129, in get_doctype_class

raise Exception, &quot;Unable to load module for :&quot; + doctype<br>Exception: Unable to load module for :cgi fun<br><br>what should i do?<br><br>Thank you<br><div><br></div>



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.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/npqS3JAogbEJ.

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








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.

To post to this group, send email to er…@googlegroups.com.

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







--
Thanks & Regards,
Mr.Gangadhar N.Kadam.
Cell: +91 9960066444
Software Engineer,
New Indictrans Technologies Pvt. Ltd., Pune

P SAVE TREES - Please consider the environment before printing this email.
SAVE ENERGY - My monitor is off whenever I am away from my desk. I am helping prevent global warming by reducing consumption of power... ARE YOU?



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.

To post to this group, send email to er…@googlegroups.com.

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







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.

To post to this group, send email to er…@googlegroups.com.

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







--
Thanks & Regards,
Mr.Gangadhar N.Kadam.
Cell: +91 9960066444
Software Engineer,
New Indictrans Technologies Pvt. Ltd., Pune


P SAVE TREES - Please consider the environment before printing this email.

SAVE ENERGY - My monitor is off whenever I am away from my desk. I am helping prevent global warming by reducing consumption of power... ARE YOU?



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.

To post to this group, send email to er...@googlegroups.com.

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

 

 


         I have to synchronize two databases. in one database i call cgi with post parameters in other database, the cgi call the method of same database having code to synchronize status of sales order.
   can i create an instance of doctype in cgi  like

Please feel free to try :)


s=Document('Sales Order',SO00001)
s.status='test'
s.save()

better to use the "bean" function

s = webnotes.bean("Sales Order", "SO00001")
s.doc.status = "test"
s.save()

(this will call validate, on_update etc)



Thank you


On 23 April 2013 11:27, Rushabh Mehta <rm...@gmail.com> wrote:
Why do you need the DocType "cgi fun"? You can add the function in your file itself.

- Rushabh

(please don't address as "sir")


W: https://erpnext.com
T: @rushabh_mehta

On 23-Apr-2013, at 10:44 AM, गंगाधर कदम <em...@gmail.com> wrote:

Hello Sir,
I have pasted my code on  http://pastebin.com/0Vbevc7S
Thank you sir


On 23 April 2013 10:18, Rushabh Mehta <rm...@gmail.com> wrote:
Gangadhar,

Please paste your code along with the exception. Otherwise we have no idea what you are doing. Ideally use gist or pastebin for the same.

Any special reason you are using get_obj? You can directly call the python method.

- Rushabh

On 23-Apr-2013, at 10:14 AM, gangadhar kadam <em...@gmail.com> wrote:

Hello All,
   I have created a cgi fun  doctype ( is Single)  in selling module and wrote some code . I have create one cgi.  from that cgi i call method in cgi fun doctype. when i call cgi with mozila firefox poster  receives following error


Traceback (most recent call last):
  File “/var/www/sites/mtnadvantage.xbs360.com/public/status.cgi”, line 26, in &lt;module&gt;

    m=get_obj(‘cgi fun’).cstatus(argjson[‘ponumber’],argjson[‘status’])
  File “…/lib/webnotes/model/code.py”, line 161, in get_obj
    return get_server_obj(doclist[0], doclist)

  File “…/lib/webnotes/model/code.py”, line 107, in get_server_obj
    DocType = get_doctype_class(doc.doctype, module)
  File “…/lib/webnotes/model/code.py”, line 129, in get_doctype_class

    raise Exception, “Unable to load module for :” + doctype
Exception: Unable to load module for :cgi fun

what should i do?

Thank you




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.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/npqS3JAogbEJ.

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

 

 





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.

To post to this group, send email to er…@googlegroups.com.

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

 

 




--
Thanks & Regards,
Mr.Gangadhar N.Kadam.
Cell: +91 9960066444
Software Engineer,
New Indictrans Technologies Pvt. Ltd., Pune

SAVE TREES - Please consider the environment before printing this email.
SAVE ENERGY - My monitor is off whenever I am away from my desk. I am helping  prevent global warming by reducing consumption of power... ARE YOU?



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.

To post to this group, send email to er…@googlegroups.com.

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

 

 





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.

To post to this group, send email to er…@googlegroups.com.

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

 

 




--
Thanks & Regards,
Mr.Gangadhar N.Kadam.
Cell: +91 9960066444
Software Engineer,
New Indictrans Technologies Pvt. Ltd., Pune

SAVE TREES - Please consider the environment before printing this email.
SAVE ENERGY - My monitor is off whenever I am away from my desk. I am helping  prevent global warming by reducing consumption of power... ARE YOU?



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.

To post to this group, send email to er…@googlegroups.com.

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

 

 




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.

To post to this group, send email to er...@googlegroups.com.

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