Name Lock is not defined problem

33 views
Skip to first unread message

JIEREN JIA

unread,
Jun 15, 2017, 1:30:42 AM6/15/17
to Kivy users support
I just paste from the animation example and meet this problem. I reinstalled kivy for several time but still didn't work
Could anyone help me? Thanks a lot!
Kivy v1.10.0

NameErrorTraceback (most recent call last)
<ipython-input-16-d45ffdfb90e6> in <module>()
      3 kivy.require('1.0.7')
      4 
----> 5 from kivy.animation import Animation
      6 from kivy.app import App
      7 from kivy.uix.button import Button

C:\Users\user\Anaconda2\lib\site-packages\kivy\animation.py in <module>()
     85 
     86 from math import sqrt, cos, sin, pi
---> 87 from kivy.event import EventDispatcher
     88 from kivy.clock import Clock
     89 from kivy.compat import string_types, iterkeys

C:\Users\user\Anaconda2\lib\site-packages\kivy\event.py in <module>()
      6 __all__ = ('EventDispatcher', 'ObjectWithUid', 'Observable')
      7 
----> 8 import kivy._event
      9 __doc__ = kivy._event.__doc__
     10 EventDispatcher = kivy._event.EventDispatcher

C:\Users\user\Anaconda2\lib\site-packages\kivy\properties.pxd in init kivy._event (kivy\_event.c:15864)()
      1 from kivy._event cimport EventDispatcher, EventObservers
      2 
----> 3 cdef class PropertyStorage:
      4     cdef object value
      5     cdef EventObservers observers

kivy\properties.pyx in init kivy.properties (kivy\properties.c:35115)()

C:\Users\user\Anaconda2\lib\site-packages\kivy\clock.py in <module>()
    817                 _clk, sorted(_classes.keys())))
    818 
--> 819     Clock = register_context('Clock', _classes[_clk])
    820     '''The kivy Clock instance. See module documentation for details.
    821     '''

C:\Users\user\Anaconda2\lib\site-packages\kivy\context.pyc in register_context(name, cls, *args, **kwargs)
     81     '''Register a new context.
     82     '''
---> 83     instance = cls(*args, **kwargs)
     84     proxy = ProxyContext(instance)
     85     _contexts[name] = {

C:\Users\user\Anaconda2\lib\site-packages\kivy\clock.py in __init__(self, **kwargs)
    711 
    712     def __init__(self, **kwargs):
--> 713         super(ClockBase, self).__init__(**kwargs)
    714         self._sleep_obj = _get_sleep_obj()
    715 

C:\Users\user\Anaconda2\lib\site-packages\kivy\clock.py in __init__(self, **kwargs)
    486 
    487     def __init__(self, **kwargs):
--> 488         super(ClockBaseBehavior, self).__init__(**kwargs)
    489         self._duration_ts0 = self._start_tick = self._last_tick = self.time()
    490         self._max_fps = float(Config.getint('graphics', 'maxfps'))

kivy\_clock.pyx in kivy._clock.CyClockBase.__init__ (kivy\_clock.c:5101)()

NameError: name 'Lock' is not defined

Matthew Einhorn

unread,
Jun 15, 2017, 2:06:24 PM6/15/17
to Kivy users support
I think we need a full kivy log and OS info. Also, does your python have fail when you run `from threading import Lock`? If so it's an issue with your python/environment.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages