Hello All, Have anyone implemented the barcode image integration with ERPNext?
Thank you all
–
Please Note:
If you are posting an issue,
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.
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.
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
Hello All, I have installed pyBarcode/0.7 using “pip install pyBarcode”. I have created a custom doctype for barcode and wrote following code in barcode.py import barcode from barcode.writer import ImageWriter EAN = barcode.get_barcode_class(‘ean13’) ean = EAN(u’5901234123457’, writer=ImageWriter()) fullname = ean.save(‘ean13_kadam’)
but got following error
File “…/app/selling/doctype/barcode/barcode.py”, line 11, in on_update
from barcode.writer import ImageWriter
ImportError: No module named writer
same code works in python terminal and in ERPNext cgi
how to resolve this issue?
Thank you
–
Please Note:
If you are posting an issue,
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.
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.
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
When importing modules, python searches the local folder first and then the python path.
In this case, when executing barcode.py, python found that a module named barcode exists in the local folder i.e. app.some_module.doctype.barcode.barcode, and hence, it isn't able to find the barcode module.
You can confirm this by checking dir(barcode) after import barcode
As a workaround, you can write a function - create_barcode_image in, say, erpnext_module_name/utils.py, and use:
from erpnext_module_name.utils import create_barcode_image
-Anand.
On 08-Jul-2013, at 2:18 PM, gangadhar kadam <em...@gmail.com> wrote:
Hello All, I have installed pyBarcode/0.7 using "pip install pyBarcode". I have created a custom doctype for barcode and wrote following code in barcode.py import barcode from barcode.writer import ImageWriter EAN = barcode.get_barcode_class('ean13') ean = EAN(u'5901234123457', writer=ImageWriter()) fullname = ean.save('ean13_kadam')
but got following error
File "../app/selling/doctype/barcode/barcode.py", line 11, in on_update
from barcode.writer import ImageWriter
ImportError: No module named writer
same code works in python terminal and in ERPNext cgi
how to resolve this issue?
Thank you
–
Please Note:
If you are posting an issue,
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.
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.
—
You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.
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.
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.
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
On 08-Jul-2013, at 2:04 PM, gangadhar kadam <em...@gmail.com> wrote:
Hello All, Have anyone implemented the barcode image integration with ERPNext?
Thank you all
–
Please Note:
If you are posting an issue,
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.
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.
—
You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.
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.
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.