IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Bibliothèques tierces Python Discussion :

pyqrcode Problème compilation


Sujet :

Bibliothèques tierces Python

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2007
    Messages
    75
    Détails du profil
    Informations personnelles :
    Âge : 37
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2007
    Messages : 75
    Par défaut pyqrcode Problème compilation
    Bonjour à tous,

    Pour pouvoir créer un Qr code j'utilise la librairie pyqrcode.

    Je l'ai installé en suivant le tuto.

    Lorsque je compile l'exemple sur le site avec ipython ou même avec python ligne par ligne pas de problème mais lorsque je compile le fichier py avec le même code j'ai une erreur.
    Voici l'erreur:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    File "qrcode.py", line 6, in <module>
        import sys, qrcode
      File "/usr/src/qrcode.py", line 8, in <module>
        e = qrcode.Encoder()
    AttributeError: 'module' object has no attribute 'Encoder'
    le code :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    import sys, qrcode
     
    e = qrcode.Encoder()
    image = e.encode('woah!', version=15, mode=e.mode.BINARY, eclevel=e.eclevel.H)
    image.save('out.png')
    Une idée du problème?

    D'avance merci pour les réponses

  2. #2
    Expert confirmé

    Homme Profil pro
    Inscrit en
    Octobre 2008
    Messages
    4 307
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2008
    Messages : 4 307
    Par défaut
    Tu peux lister le contenu de qrcode avec qrcode.__dict__

    Sinon, ils ont un forum : http://sourceforge.net/projects/pyqr...s/forum/886787

    Quelqu'un pose la même question que toi, sans réponse.

    Tu as trouvé un package ou tu as compilé, parce qu'il faut tenir compte de ta version de
    Java Runtime Environment (JRE)

  3. #3
    Membre confirmé
    Profil pro
    Inscrit en
    Octobre 2007
    Messages
    75
    Détails du profil
    Informations personnelles :
    Âge : 37
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2007
    Messages : 75
    Par défaut
    Voici le resultat de qrcode.__dict__
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    {'CLASSPATH': '/usr/lib/python2.5/site-packages/qrcode-0.2.1-py2.5-linux-i686.egg/qrcode/qrcode.jar',
     'Decoder': <type 'Decoder'>,
     'Encoder': <class 'qrcode.Encoder'>,
     'InvalidArgsError': <class 'qrcode.InvalidArgsError'>,
     'JavaError': <class 'qrcode.JavaError'>,
     'VERSION': '0.2.1',
     '__builtins__': {'ArithmeticError': <type 'exceptions.ArithmeticError'>,
                      'AssertionError': <type 'exceptions.AssertionError'>,
                      'AttributeError': <type 'exceptions.AttributeError'>,
                      'BaseException': <type 'exceptions.BaseException'>,
                      'DeprecationWarning': <type 'exceptions.DeprecationWarning'>,
                      'EOFError': <type 'exceptions.EOFError'>,
                      'Ellipsis': Ellipsis,
                      'EnvironmentError': <type 'exceptions.EnvironmentError'>,
                      'Exception': <type 'exceptions.Exception'>,
                      'False': False,
                      'FloatingPointError': <type 'exceptions.FloatingPointError'>,
                      'FutureWarning': <type 'exceptions.FutureWarning'>,
                      'GeneratorExit': <type 'exceptions.GeneratorExit'>,
                      'IOError': <type 'exceptions.IOError'>,
                      'ImportError': <type 'exceptions.ImportError'>,
                      'ImportWarning': <type 'exceptions.ImportWarning'>,
                      'IndentationError': <type 'exceptions.IndentationError'>,
                      'IndexError': <type 'exceptions.IndexError'>,
                      'KeyError': <type 'exceptions.KeyError'>,
                      'KeyboardInterrupt': <type 'exceptions.KeyboardInterrupt'>,
                      'LookupError': <type 'exceptions.LookupError'>,
                      'MemoryError': <type 'exceptions.MemoryError'>,
                      'NameError': <type 'exceptions.NameError'>,
                      'None': None,
                      'NotImplemented': NotImplemented,
                      'NotImplementedError': <type 'exceptions.NotImplementedError'>,
                      'OSError': <type 'exceptions.OSError'>,
                      'OverflowError': <type 'exceptions.OverflowError'>,
                      'PendingDeprecationWarning': <type 'exceptions.PendingDeprecationWarning'>,
                      'ReferenceError': <type 'exceptions.ReferenceError'>,
                      'RuntimeError': <type 'exceptions.RuntimeError'>,
                      'RuntimeWarning': <type 'exceptions.RuntimeWarning'>,
                      'StandardError': <type 'exceptions.StandardError'>,
                      'StopIteration': <type 'exceptions.StopIteration'>,
                      'SyntaxError': <type 'exceptions.SyntaxError'>,
                      'SyntaxWarning': <type 'exceptions.SyntaxWarning'>,
                      'SystemError': <type 'exceptions.SystemError'>,
                      'SystemExit': <type 'exceptions.SystemExit'>,
                      'TabError': <type 'exceptions.TabError'>,
                      'True': True,
                      'TypeError': <type 'exceptions.TypeError'>,
                      'UnboundLocalError': <type 'exceptions.UnboundLocalError'>,
                      'UnicodeDecodeError': <type 'exceptions.UnicodeDecodeError'>,
                      'UnicodeEncodeError': <type 'exceptions.UnicodeEncodeError'>,
                      'UnicodeError': <type 'exceptions.UnicodeError'>,
                      'UnicodeTranslateError': <type 'exceptions.UnicodeTranslateError'>,
                      'UnicodeWarning': <type 'exceptions.UnicodeWarning'>,
                      'UserWarning': <type 'exceptions.UserWarning'>,
                      'ValueError': <type 'exceptions.ValueError'>,
                      'Warning': <type 'exceptions.Warning'>,
                      'ZeroDivisionError': <type 'exceptions.ZeroDivisionError'>,
                      '__IPYTHON__': <IPython.iplib.InteractiveShell object at 0xb7dd472c>,
                      '__IPYTHON__active': 1,
                      '__debug__': True,
                      '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.",
                      '__import__': <built-in function __import__>,
                      '__name__': '__builtin__',
                      'abs': <built-in function abs>,
                      'all': <built-in function all>,
                      'any': <built-in function any>,
                      'apply': <built-in function apply>,
                      'basestring': <type 'basestring'>,
                      'bool': <type 'bool'>,
                      'buffer': <type 'buffer'>,
                      'callable': <built-in function callable>,
                      'chr': <built-in function chr>,
                      'classmethod': <type 'classmethod'>,
                      'cmp': <built-in function cmp>,
                      'coerce': <built-in function coerce>,
                      'compile': <built-in function compile>,
                      'complex': <type 'complex'>,
                      'copyright': Copyright (c) 2001-2008 Python Software Foundation.
    All Rights Reserved.
     
    Copyright (c) 2000 BeOpen.com.
    All Rights Reserved.
     
    Copyright (c) 1995-2001 Corporation for National Research Initiatives.
    All Rights Reserved.
     
    Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
    All Rights Reserved.
     
        Copyright (c) 2001-2004 Fernando Perez, Janko Hauser, Nathan Gray.
        All Rights Reserved.,
                      'credits':
        Python:     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands
        for supporting Python development.  See www.python.org for more information.
     
        IPython: Fernando Perez, Janko Hauser, Nathan Gray, and many users.
        See http://ipython.scipy.org for more information.,
                      'delattr': <built-in function delattr>,
                      'dict': <type 'dict'>,
                      'dir': <built-in function dir>,
                      'divmod': <built-in function divmod>,
                      'dreload': <function reload at 0xa227614>,
                      'enumerate': <type 'enumerate'>,
                      'eval': <built-in function eval>,
                      'execfile': <built-in function execfile>,
                      'exit': Type exit() to exit.,
                      'file': <type 'file'>,
                      'filter': <built-in function filter>,
                      'float': <type 'float'>,
                      'frozenset': <type 'frozenset'>,
                      'getattr': <built-in function getattr>,
                      'globals': <built-in function globals>,
                      'hasattr': <built-in function hasattr>,
                      'hash': <built-in function hash>,
                      'help': Type help() for interactive help, or help(object) for help about object.,
                      'hex': <built-in function hex>,
                      'id': <built-in function id>,
                      'input': <built-in function input>,
                      'int': <type 'int'>,
                      'intern': <built-in function intern>,
                      'ip_set_hook': <bound method InteractiveShell.set_hook of <IPython.iplib.InteractiveShell object at 0xb7dd472c>>,
                      'ipalias': <function newFunc at 0xa227224>,
                      'ipmagic': <function newFunc at 0xa2271ec>,
                      'ipsystem': <function newFunc at 0xa22725c>,
                      'isinstance': <built-in function isinstance>,
                      'issubclass': <built-in function issubclass>,
                      'iter': <built-in function iter>,
                      'jobs': <IPython.background_jobs.BackgroundJobManager instance at 0xa0a22ec>,
                      'len': <built-in function len>,
                      'license': Type license() to see the full license text,
                      'list': <type 'list'>,
                      'locals': <built-in function locals>,
                      'long': <type 'long'>,
                      'map': <built-in function map>,
                      'max': <built-in function max>,
                      'min': <built-in function min>,
                      'object': <type 'object'>,
                      'oct': <built-in function oct>,
                      'open': <built-in function open>,
                      'ord': <built-in function ord>,
                      'pow': <built-in function pow>,
                      'property': <type 'property'>,
                      'quit': Type quit() to exit.,
                      'range': <built-in function range>,
                      'raw_input': <built-in function raw_input>,
                      'reduce': <built-in function reduce>,
                      'reload': <built-in function reload>,
                      'repr': <built-in function repr>,
                      'reversed': <type 'reversed'>,
                      'round': <built-in function round>,
                      'set': <type 'set'>,
                      'setattr': <built-in function setattr>,
                      'slice': <type 'slice'>,
                      'sorted': <built-in function sorted>,
                      'staticmethod': <type 'staticmethod'>,
                      'str': <type 'str'>,
                      'sum': <built-in function sum>,
                      'super': <type 'super'>,
                      'tuple': <type 'tuple'>,
                      'type': <type 'type'>,
                      'unichr': <built-in function unichr>,
                      'unicode': <type 'unicode'>,
                      'vars': <built-in function vars>,
                      'xrange': <type 'xrange'>,
                      'zip': <built-in function zip>},
     '__dir__': '/usr/lib/python2.5/site-packages/qrcode-0.2.1-py2.5-linux-i686.egg/qrcode',
     '__doc__': None,
     '__file__': '/usr/lib/python2.5/site-packages/qrcode-0.2.1-py2.5-linux-i686.egg/qrcode/__init__.pyc',
     '__name__': 'qrcode',
     '__path__': ['/usr/lib/python2.5/site-packages/qrcode-0.2.1-py2.5-linux-i686.egg/qrcode'],
     '_encode': <built-in function _encode>,
     '_jvm': <jcc.JCCEnv object at 0xb7dba1f0>,
     '_qrcode': <module 'qrcode._qrcode' from '/usr/lib/python2.5/site-packages/qrcode-0.2.1-py2.5-linux-i686.egg/qrcode/_qrcode.so'>,
     'classobj': <type 'classobj'>,
     'expand': <function expand at 0xa2ff80c>,
     'fromstring': <function fromstring at 0xa2ff33c>,
     'os': <module 'os' from '/usr/lib/python2.5/os.pyc'>}
    J'ai compilé moi même les sources

Discussions similaires

  1. [VB5] Problème compilation, ocx manquants
    Par rastali dans le forum VB 6 et antérieur
    Réponses: 2
    Dernier message: 10/10/2005, 14h39
  2. [Kylix] Problème de compilation
    Par rabbi_jaccob dans le forum EDI
    Réponses: 3
    Dernier message: 25/07/2005, 23h36
  3. Problème compilation (toolkit Maximum Entropy)
    Par yannick_frere dans le forum MFC
    Réponses: 4
    Dernier message: 07/03/2005, 09h47
  4. Problème compilation Version 8.0.1 sous Debian Sarge
    Par LIndien dans le forum PostgreSQL
    Réponses: 1
    Dernier message: 04/02/2005, 21h38
  5. [Kylix] problème compilation kylix3 avec redhat 9.0
    Par madininaoursa dans le forum EDI
    Réponses: 1
    Dernier message: 02/07/2003, 16h21

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo