pyqrencode icon indicating copy to clipboard operation
pyqrencode copied to clipboard

Option usage

Open benoit-intrw opened this issue 13 years ago • 2 comments

The option enum from qrencode.h are not available at python level. (QR_ECLEVEL_L, etc., QR_MODE_NUM, etc.)

How are we supposed to pass option to encode method ?

I've tried following code which result in segmentation fault.

enc.encode('http://bit.ly', {'mode': 1, 'ec_level': 1})

Any tips ?

benoit-intrw avatar Oct 31 '11 15:10 benoit-intrw

that appears to be the best way to pass them in currently, but those should be exposed to python.

Can you give a backtrace for where you get a segfault? also, what eversion python are you using?

jehiah avatar Oct 31 '11 15:10 jehiah

Thank you for the quick response.

There is no backtrace, just a laconic "Erreur de segmentation" (My locale are in french)

I re-build the env to be sure, so:

  • Debian squeeze 64bit,
  • python 2.7 in a virtualenv,
  • PIL 1.1.7,
  • libqrencode3 3.1.1

Running test_qr.py works. Then, I change the code as describe in my first message and get the segfault.

benoit-intrw avatar Nov 02 '11 08:11 benoit-intrw