Exception When Compiling ramp.py Example

Post here to get support
Post Reply
phillipz
Beginner
Posts: 8
Joined: Sun Jun 19, 2016 10:56 pm

Exception When Compiling ramp.py Example

Post by phillipz »

Hi all,

I am seeing an issue when compiling the ramp.py Crazyflie lib example (https://github.com/bitcraze/crazyflie-c ... es/ramp.py. Although the python file works occasionally, the majority of the time it appears the program is connecting to the quadcopter - yet I am seeing no physical response. Here is the output I am seeing in the console when compiling the Python example, the verbose flag is enabled:

Code: Select all

phillip@saturn:~/Downloads/crazyflie-lib-python/examples$ python -v ramp.py 
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /usr/lib/python2.7/site.pyc matches /usr/lib/python2.7/site.py
import site # precompiled from /usr/lib/python2.7/site.pyc
# /usr/lib/python2.7/os.pyc matches /usr/lib/python2.7/os.py
import os # precompiled from /usr/lib/python2.7/os.pyc
import errno # builtin
import posix # builtin
# /usr/lib/python2.7/posixpath.pyc matches /usr/lib/python2.7/posixpath.py
import posixpath # precompiled from /usr/lib/python2.7/posixpath.pyc
# /usr/lib/python2.7/stat.pyc matches /usr/lib/python2.7/stat.py
import stat # precompiled from /usr/lib/python2.7/stat.pyc
# /usr/lib/python2.7/genericpath.pyc matches /usr/lib/python2.7/genericpath.py
import genericpath # precompiled from /usr/lib/python2.7/genericpath.pyc
# /usr/lib/python2.7/warnings.pyc matches /usr/lib/python2.7/warnings.py
import warnings # precompiled from /usr/lib/python2.7/warnings.pyc
# /usr/lib/python2.7/linecache.pyc matches /usr/lib/python2.7/linecache.py
import linecache # precompiled from /usr/lib/python2.7/linecache.pyc
# /usr/lib/python2.7/types.pyc matches /usr/lib/python2.7/types.py
import types # precompiled from /usr/lib/python2.7/types.pyc
# /usr/lib/python2.7/UserDict.pyc matches /usr/lib/python2.7/UserDict.py
import UserDict # precompiled from /usr/lib/python2.7/UserDict.pyc
# /usr/lib/python2.7/_abcoll.pyc matches /usr/lib/python2.7/_abcoll.py
import _abcoll # precompiled from /usr/lib/python2.7/_abcoll.pyc
# /usr/lib/python2.7/abc.pyc matches /usr/lib/python2.7/abc.py
import abc # precompiled from /usr/lib/python2.7/abc.pyc
# /usr/lib/python2.7/_weakrefset.pyc matches /usr/lib/python2.7/_weakrefset.py
import _weakrefset # precompiled from /usr/lib/python2.7/_weakrefset.pyc
import _weakref # builtin
# /usr/lib/python2.7/copy_reg.pyc matches /usr/lib/python2.7/copy_reg.py
import copy_reg # precompiled from /usr/lib/python2.7/copy_reg.pyc
# /usr/lib/python2.7/traceback.pyc matches /usr/lib/python2.7/traceback.py
import traceback # precompiled from /usr/lib/python2.7/traceback.pyc
# /usr/lib/python2.7/sysconfig.pyc matches /usr/lib/python2.7/sysconfig.py
import sysconfig # precompiled from /usr/lib/python2.7/sysconfig.pyc
# /usr/lib/python2.7/re.pyc matches /usr/lib/python2.7/re.py
import re # precompiled from /usr/lib/python2.7/re.pyc
# /usr/lib/python2.7/sre_compile.pyc matches /usr/lib/python2.7/sre_compile.py
import sre_compile # precompiled from /usr/lib/python2.7/sre_compile.pyc
import _sre # builtin
# /usr/lib/python2.7/sre_parse.pyc matches /usr/lib/python2.7/sre_parse.py
import sre_parse # precompiled from /usr/lib/python2.7/sre_parse.pyc
# /usr/lib/python2.7/sre_constants.pyc matches /usr/lib/python2.7/sre_constants.py
import sre_constants # precompiled from /usr/lib/python2.7/sre_constants.pyc
# /usr/lib/python2.7/_sysconfigdata.pyc matches /usr/lib/python2.7/_sysconfigdata.py
import _sysconfigdata # precompiled from /usr/lib/python2.7/_sysconfigdata.pyc
# /usr/lib/python2.7/plat-x86_64-linux-gnu/_sysconfigdata_nd.pyc matches /usr/lib/python2.7/plat-x86_64-linux-gnu/_sysconfigdata_nd.py
import _sysconfigdata_nd # precompiled from /usr/lib/python2.7/plat-x86_64-linux-gnu/_sysconfigdata_nd.pyc
# /usr/lib/python2.7/sitecustomize.pyc matches /usr/lib/python2.7/sitecustomize.py
import sitecustomize # precompiled from /usr/lib/python2.7/sitecustomize.pyc
import encodings # directory /usr/lib/python2.7/encodings
# /usr/lib/python2.7/encodings/__init__.pyc matches /usr/lib/python2.7/encodings/__init__.py
import encodings # precompiled from /usr/lib/python2.7/encodings/__init__.pyc
# /usr/lib/python2.7/codecs.pyc matches /usr/lib/python2.7/codecs.py
import codecs # precompiled from /usr/lib/python2.7/codecs.pyc
import _codecs # builtin
# /usr/lib/python2.7/encodings/aliases.pyc matches /usr/lib/python2.7/encodings/aliases.py
import encodings.aliases # precompiled from /usr/lib/python2.7/encodings/aliases.pyc
# /usr/lib/python2.7/encodings/utf_8.pyc matches /usr/lib/python2.7/encodings/utf_8.py
import encodings.utf_8 # precompiled from /usr/lib/python2.7/encodings/utf_8.pyc
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import logging # directory /usr/lib/python2.7/logging
# /usr/lib/python2.7/logging/__init__.pyc matches /usr/lib/python2.7/logging/__init__.py
import logging # precompiled from /usr/lib/python2.7/logging/__init__.pyc
import time # builtin
import cStringIO # builtin
# /usr/lib/python2.7/weakref.pyc matches /usr/lib/python2.7/weakref.py
import weakref # precompiled from /usr/lib/python2.7/weakref.pyc
import thread # builtin
# /usr/lib/python2.7/threading.pyc matches /usr/lib/python2.7/threading.py
import threading # precompiled from /usr/lib/python2.7/threading.pyc
# /usr/lib/python2.7/collections.pyc matches /usr/lib/python2.7/collections.py
import collections # precompiled from /usr/lib/python2.7/collections.pyc
import _collections # builtin
import operator # builtin
# /usr/lib/python2.7/keyword.pyc matches /usr/lib/python2.7/keyword.py
import keyword # precompiled from /usr/lib/python2.7/keyword.pyc
# /usr/lib/python2.7/heapq.pyc matches /usr/lib/python2.7/heapq.py
import heapq # precompiled from /usr/lib/python2.7/heapq.pyc
import itertools # builtin
import _heapq # builtin
# /usr/lib/python2.7/atexit.pyc matches /usr/lib/python2.7/atexit.py
import atexit # precompiled from /usr/lib/python2.7/atexit.pyc
import cflib # directory /home/phillip/Downloads/crazyflie-lib-python/cflib
# /home/phillip/Downloads/crazyflie-lib-python/cflib/__init__.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/__init__.py
import cflib # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/__init__.pyc
import cflib.crazyflie # directory /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie
# /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/__init__.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/__init__.py
import cflib.crazyflie # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/__init__.pyc
dlopen("/usr/lib/python2.7/lib-dynload/datetime.x86_64-linux-gnu.so", 2);
import datetime # dynamically loaded from /usr/lib/python2.7/lib-dynload/datetime.x86_64-linux-gnu.so
import cflib.crtp # directory /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp
# /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/__init__.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/__init__.py
import cflib.crtp # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/__init__.pyc
# /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/debugdriver.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/debugdriver.py
import cflib.crtp.debugdriver # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/debugdriver.pyc
# /usr/lib/python2.7/random.pyc matches /usr/lib/python2.7/random.py
import random # precompiled from /usr/lib/python2.7/random.pyc
# /usr/lib/python2.7/__future__.pyc matches /usr/lib/python2.7/__future__.py
import __future__ # precompiled from /usr/lib/python2.7/__future__.pyc
import math # builtin
import binascii # builtin
# /usr/lib/python2.7/hashlib.pyc matches /usr/lib/python2.7/hashlib.py
import hashlib # precompiled from /usr/lib/python2.7/hashlib.pyc
dlopen("/usr/lib/python2.7/lib-dynload/_hashlib.x86_64-linux-gnu.so", 2);
import _hashlib # dynamically loaded from /usr/lib/python2.7/lib-dynload/_hashlib.x86_64-linux-gnu.so
import _random # builtin
# /usr/lib/python2.7/string.pyc matches /usr/lib/python2.7/string.py
import string # precompiled from /usr/lib/python2.7/string.pyc
import strop # builtin
# /usr/lib/python2.7/struct.pyc matches /usr/lib/python2.7/struct.py
import struct # precompiled from /usr/lib/python2.7/struct.pyc
import _struct # builtin
# /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/crtpdriver.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/crtpdriver.py
import cflib.crtp.crtpdriver # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/crtpdriver.pyc
# /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/crtpstack.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/crtpstack.py
import cflib.crtp.crtpstack # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/crtpstack.pyc
# /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/exceptions.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/exceptions.py
import cflib.crtp.exceptions # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/exceptions.pyc
# /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/log.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/log.py
import cflib.crazyflie.log # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/log.pyc
# /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/toc.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/toc.py
import cflib.crazyflie.toc # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/toc.pyc
import cflib.utils # directory /home/phillip/Downloads/crazyflie-lib-python/cflib/utils
# /home/phillip/Downloads/crazyflie-lib-python/cflib/utils/__init__.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/utils/__init__.py
import cflib.utils # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/utils/__init__.pyc
# /home/phillip/Downloads/crazyflie-lib-python/cflib/utils/callbacks.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/utils/callbacks.py
import cflib.utils.callbacks # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/utils/callbacks.pyc
# /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/param.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/param.py
import cflib.crazyflie.param # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/param.pyc
# /usr/lib/python2.7/Queue.pyc matches /usr/lib/python2.7/Queue.py
import Queue # precompiled from /usr/lib/python2.7/Queue.pyc
# /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/radiodriver.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/radiodriver.py
import cflib.crtp.radiodriver # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/radiodriver.pyc
import array # builtin
import usb # directory /usr/local/lib/python2.7/dist-packages/usb
# /usr/local/lib/python2.7/dist-packages/usb/__init__.pyc matches /usr/local/lib/python2.7/dist-packages/usb/__init__.py
import usb # precompiled from /usr/local/lib/python2.7/dist-packages/usb/__init__.pyc
# /usr/local/lib/python2.7/dist-packages/usb/_debug.pyc matches /usr/local/lib/python2.7/dist-packages/usb/_debug.py
import usb._debug # precompiled from /usr/local/lib/python2.7/dist-packages/usb/_debug.pyc
# /usr/local/lib/python2.7/dist-packages/usb/_interop.pyc matches /usr/local/lib/python2.7/dist-packages/usb/_interop.py
import usb._interop # precompiled from /usr/local/lib/python2.7/dist-packages/usb/_interop.pyc
# /usr/lib/python2.7/functools.pyc matches /usr/lib/python2.7/functools.py
import functools # precompiled from /usr/lib/python2.7/functools.pyc
import _functools # builtin
# /usr/local/lib/python2.7/dist-packages/usb/legacy.pyc matches /usr/local/lib/python2.7/dist-packages/usb/legacy.py
import usb.legacy # precompiled from /usr/local/lib/python2.7/dist-packages/usb/legacy.pyc
# /usr/local/lib/python2.7/dist-packages/usb/core.pyc matches /usr/local/lib/python2.7/dist-packages/usb/core.py
import usb.core # precompiled from /usr/local/lib/python2.7/dist-packages/usb/core.pyc
# /usr/local/lib/python2.7/dist-packages/usb/util.pyc matches /usr/local/lib/python2.7/dist-packages/usb/util.py
import usb.util # precompiled from /usr/local/lib/python2.7/dist-packages/usb/util.pyc
# /usr/lib/python2.7/copy.pyc matches /usr/lib/python2.7/copy.py
import copy # precompiled from /usr/lib/python2.7/copy.pyc
# /usr/local/lib/python2.7/dist-packages/usb/_objfinalizer.pyc matches /usr/local/lib/python2.7/dist-packages/usb/_objfinalizer.py
import usb._objfinalizer # precompiled from /usr/local/lib/python2.7/dist-packages/usb/_objfinalizer.pyc
# /usr/local/lib/python2.7/dist-packages/usb/_lookup.pyc matches /usr/local/lib/python2.7/dist-packages/usb/_lookup.py
import usb._lookup # precompiled from /usr/local/lib/python2.7/dist-packages/usb/_lookup.pyc
# /usr/local/lib/python2.7/dist-packages/usb/control.pyc matches /usr/local/lib/python2.7/dist-packages/usb/control.py
import usb.control # precompiled from /usr/local/lib/python2.7/dist-packages/usb/control.pyc
import cflib.drivers # directory /home/phillip/Downloads/crazyflie-lib-python/cflib/drivers
# /home/phillip/Downloads/crazyflie-lib-python/cflib/drivers/__init__.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/drivers/__init__.py
import cflib.drivers # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/drivers/__init__.pyc
# /home/phillip/Downloads/crazyflie-lib-python/cflib/drivers/crazyradio.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/drivers/crazyradio.py
import cflib.drivers.crazyradio # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/drivers/crazyradio.pyc
# /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/serialdriver.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/serialdriver.py
import cflib.crtp.serialdriver # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/serialdriver.pyc
# /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/udpdriver.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/udpdriver.py
import cflib.crtp.udpdriver # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/udpdriver.pyc
# /usr/lib/python2.7/socket.pyc matches /usr/lib/python2.7/socket.py
import socket # precompiled from /usr/lib/python2.7/socket.pyc
import _socket # builtin
dlopen("/usr/lib/python2.7/lib-dynload/_ssl.x86_64-linux-gnu.so", 2);
import _ssl # dynamically loaded from /usr/lib/python2.7/lib-dynload/_ssl.x86_64-linux-gnu.so
# /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/usbdriver.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/usbdriver.py
import cflib.crtp.usbdriver # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/crtp/usbdriver.pyc
# /home/phillip/Downloads/crazyflie-lib-python/cflib/drivers/cfusb.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/drivers/cfusb.py
import cflib.drivers.cfusb # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/drivers/cfusb.pyc
# /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/commander.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/commander.py
import cflib.crazyflie.commander # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/commander.pyc
# /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/console.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/console.py
import cflib.crazyflie.console # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/console.pyc
# /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/mem.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/mem.py
import cflib.crazyflie.mem # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/mem.pyc
# /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/platformservice.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/platformservice.py
import cflib.crazyflie.platformservice # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/platformservice.pyc
# /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/toccache.pyc matches /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/toccache.py
import cflib.crazyflie.toccache # precompiled from /home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/toccache.pyc
import json # directory /usr/lib/python2.7/json
# /usr/lib/python2.7/json/__init__.pyc matches /usr/lib/python2.7/json/__init__.py
import json # precompiled from /usr/lib/python2.7/json/__init__.pyc
# /usr/lib/python2.7/json/decoder.pyc matches /usr/lib/python2.7/json/decoder.py
import json.decoder # precompiled from /usr/lib/python2.7/json/decoder.pyc
# /usr/lib/python2.7/json/scanner.pyc matches /usr/lib/python2.7/json/scanner.py
import json.scanner # precompiled from /usr/lib/python2.7/json/scanner.pyc
dlopen("/usr/lib/python2.7/lib-dynload/_json.x86_64-linux-gnu.so", 2);
import _json # dynamically loaded from /usr/lib/python2.7/lib-dynload/_json.x86_64-linux-gnu.so
# /usr/lib/python2.7/encodings/hex_codec.pyc matches /usr/lib/python2.7/encodings/hex_codec.py
import encodings.hex_codec # precompiled from /usr/lib/python2.7/encodings/hex_codec.pyc
# /usr/lib/python2.7/json/encoder.pyc matches /usr/lib/python2.7/json/encoder.py
import json.encoder # precompiled from /usr/lib/python2.7/json/encoder.pyc
# /usr/lib/python2.7/glob.pyc matches /usr/lib/python2.7/glob.py
import glob # precompiled from /usr/lib/python2.7/glob.pyc
# /usr/lib/python2.7/fnmatch.pyc matches /usr/lib/python2.7/fnmatch.py
import fnmatch # precompiled from /usr/lib/python2.7/fnmatch.pyc
Scanning interfaces for Crazyflies...
import usb.backend # directory /usr/local/lib/python2.7/dist-packages/usb/backend
# /usr/local/lib/python2.7/dist-packages/usb/backend/__init__.pyc matches /usr/local/lib/python2.7/dist-packages/usb/backend/__init__.py
import usb.backend # precompiled from /usr/local/lib/python2.7/dist-packages/usb/backend/__init__.pyc
# /usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.pyc matches /usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py
import usb.backend.libusb1 # precompiled from /usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.pyc
import ctypes # directory /usr/lib/python2.7/ctypes
# /usr/lib/python2.7/ctypes/__init__.pyc matches /usr/lib/python2.7/ctypes/__init__.py
import ctypes # precompiled from /usr/lib/python2.7/ctypes/__init__.pyc
dlopen("/usr/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so", 2);
import _ctypes # dynamically loaded from /usr/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so
# /usr/lib/python2.7/ctypes/_endian.pyc matches /usr/lib/python2.7/ctypes/_endian.py
import ctypes._endian # precompiled from /usr/lib/python2.7/ctypes/_endian.pyc
# /usr/local/lib/python2.7/dist-packages/usb/libloader.pyc matches /usr/local/lib/python2.7/dist-packages/usb/libloader.py
import usb.libloader # precompiled from /usr/local/lib/python2.7/dist-packages/usb/libloader.pyc
# /usr/lib/python2.7/ctypes/util.pyc matches /usr/lib/python2.7/ctypes/util.py
import ctypes.util # precompiled from /usr/lib/python2.7/ctypes/util.pyc
# /usr/lib/python2.7/tempfile.pyc matches /usr/lib/python2.7/tempfile.py
import tempfile # precompiled from /usr/lib/python2.7/tempfile.pyc
# /usr/lib/python2.7/io.pyc matches /usr/lib/python2.7/io.py
import io # precompiled from /usr/lib/python2.7/io.pyc
import _io # builtin
import fcntl # builtin
# /usr/local/lib/python2.7/dist-packages/usb/backend/libusb0.pyc matches /usr/local/lib/python2.7/dist-packages/usb/backend/libusb0.py
import usb.backend.libusb0 # precompiled from /usr/local/lib/python2.7/dist-packages/usb/backend/libusb0.pyc
# /usr/local/lib/python2.7/dist-packages/usb/backend/openusb.pyc matches /usr/local/lib/python2.7/dist-packages/usb/backend/openusb.py
import usb.backend.openusb # precompiled from /usr/local/lib/python2.7/dist-packages/usb/backend/openusb.pyc
Crazyflies found:
radio://0/30/1M
Connecting to radio://0/30/1M
# /usr/lib/python2.7/encodings/latin_1.pyc matches /usr/lib/python2.7/encodings/latin_1.py
import encodings.latin_1 # precompiled from /usr/lib/python2.7/encodings/latin_1.pyc
# clear __builtin__._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.exitfunc
# clear sys.exc_type
# clear sys.exc_value
# clear sys.exc_traceback
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# clear sys.path_hooks
# clear sys.path_importer_cache
# clear sys.meta_path
# clear sys.flags
# clear sys.float_info
# restore sys.stdin
# restore sys.stdout
# restore sys.stderr
# cleanup __main__
# cleanup[1] sysconfig
# cleanup[1] _json
# cleanup[1] zipimport
# cleanup[1] signal
# cleanup[1] encodings
# cleanup[1] _ctypes
# cleanup[1] _sysconfigdata_nd
# cleanup[1] _functools
# cleanup[1] socket
# cleanup[1] itertools
# cleanup[1] __future__
# cleanup[1] _collections
# cleanup[1] _heapq
# cleanup[1] _socket
# cleanup[1] sre_constants
# cleanup[1] encodings.latin_1
# cleanup[1] _warnings
# cleanup[1] _codecs
# cleanup[1] _sysconfigdata
# cleanup[1] _struct
# cleanup[1] keyword
# cleanup[1] posix
# cleanup[1] encodings.aliases
# cleanup[1] exceptions
# cleanup[1] site
# cleanup[1] strop
# cleanup[1] encodings.hex_codec
# cleanup[1] _ssl
# cleanup[1] glob
# cleanup[1] sitecustomize
# cleanup[1] _weakref
# cleanup[1] _weakrefset
# cleanup[1] fnmatch
# cleanup[1] encodings.utf_8
# cleanup[2] heapq
# cleanup[2] functools
# cleanup[2] random
# cleanup[2] datetime
# cleanup[2] ctypes._endian
# cleanup[2] cflib.crtp.debugdriver
# cleanup[2] tempfile
# cleanup[2] collections
# cleanup[2] string
# cleanup[2] cflib.crtp.crtpstack
# cleanup[2] cflib.crtp.crtpdriver
# cleanup[2] json.encoder
# cleanup[2] cflib.crtp.serialdriver
# cleanup[2] cflib.crazyflie.toc
# cleanup[2] json.scanner
# cleanup[2] usb.core
# cleanup[2] threading
# cleanup[2] usb.backend.libusb0
# cleanup[2] usb.backend.libusb1
# cleanup[2] usb
# cleanup[2] cStringIO
# cleanup[2] cflib.crtp.usbdriver
# cleanup[2] usb._debug
# cleanup[2] atexit
# cleanup[2] cflib.drivers.cfusb
# cleanup[2] cflib.crazyflie.mem
# cleanup[2] abc
# cleanup[2] json
# cleanup[2] usb._lookup
# cleanup[2] re
# cleanup[2] cflib.crtp.exceptions
# cleanup[2] math
# cleanup[2] fcntl
# cleanup[2] UserDict
# cleanup[2] usb._objfinalizer
# cleanup[2] Queue
# cleanup[2] usb.control
# cleanup[2] _hashlib
# cleanup[2] ctypes
# cleanup[2] codecs
# cleanup[2] cflib.drivers.crazyradio
# cleanup[2] struct
# cleanup[2] logging
# cleanup[2] thread
# cleanup[2] traceback
# cleanup[2] cflib.crazyflie.commander
# cleanup[2] cflib.crazyflie.param
# cleanup[2] weakref
# cleanup[2] os
# cleanup[2] _sre
# cleanup[2] cflib.crazyflie.platformservice
# cleanup[2] operator
# cleanup[2] cflib
# cleanup[2] array
# cleanup[2] cflib.crtp
# cleanup[2] posixpath
# cleanup[2] ctypes.util
# cleanup[2] errno
# cleanup[2] binascii
# cleanup[2] cflib.crtp.radiodriver
# cleanup[2] os.path
# cleanup[2] cflib.crtp.udpdriver
# cleanup[2] cflib.crazyflie.console
# cleanup[2] cflib.crazyflie
# cleanup[2] cflib.drivers
# cleanup[2] copy
# cleanup[2] hashlib
# cleanup[2] sre_parse
# cleanup[2] usb.libloader
# cleanup[2] json.decoder
# cleanup[2] cflib.utils
# cleanup[2] copy_reg
# cleanup[2] sre_compile
# cleanup[2] _random
# cleanup[2] usb.backend
# cleanup[2] io
# cleanup[2] cflib.crazyflie.log
# cleanup[2] usb.util
# cleanup[2] linecache
# cleanup[2] _abcoll
# cleanup[2] cflib.utils.callbacks
# cleanup[2] cflib.crazyflie.toccache
# cleanup[2] genericpath
# cleanup[2] stat
# cleanup[2] warnings
# cleanup[2] usb.backend.openusb
# cleanup[2] types
# cleanup[2] usb._interop
# cleanup[2] _io
# cleanup[2] usb.legacy
# cleanup[2] time
# cleanup sys
# cleanup __builtin__
Exception in thread Thread-171 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
  File "/usr/lib/python2.7/threading.py", line 763, in run
  File "ramp.py", line 101, in _ramp_motors
  File "/home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/__init__.py", line 250, in close_link
  File "/home/phillip/Downloads/crazyflie-lib-python/cflib/utils/callbacks.py", line 54, in call
  File "/home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/param.py", line 246, in _disconnected
<type 'exceptions.TypeError'>: 'NoneType' object is not callable
PyThreadState_Clear: warning: thread still has a frame
PyThreadState_Clear: warning: thread still has a frame
# cleanup ints: 160 unfreed ints
# cleanup floats: 47 unfreed floats
I am running Ubuntu 14.04 with Python 2.7.6, what could be causing this issue? Occasionally the motors "ramp up" as expected, but the majority of the time I am getting no feedback. Any help is appreciated :)

EDIT: The basiclog.py example seems to always work for me
chad
Expert
Posts: 555
Joined: Sun Sep 28, 2014 12:54 am
Location: New York, USA
Contact:

Re: Exception When Compiling ramp.py Example

Post by chad »

What version of the client lib do you have cloned? Head of master?

I've run the ramp.py example from HEAD of master branch on my Mac and it seems to work OK for me. But, I'm running Python 3.4 and I'm on a Mac (not Ubuntu) so the comparison is really apples to oranges (no pun intended :) ). In any case, if I get a chance I can try to spin up an Ubuntu VM, clone the same version of client-lib you have and see what happens...
Crazyflier - my CF journal...
4x Crazyflie Nano (1.0) 10-DOF + NeoPixel Ring mod.
3x Crazyflie 2.0 + Qi Charger and LED Decks.
Raspberry Pi Ground Control.
Mac OS X Dev Environment.
Walkera Devo7e, ESky ET6I, PS3 and iOS Controllers.
phillipz
Beginner
Posts: 8
Joined: Sun Jun 19, 2016 10:56 pm

Re: Exception When Compiling ramp.py Example

Post by phillipz »

How can I check what version of the client lib I have installed? I cloned the repository using:

Code: Select all

git clone --recursive https://github.com/bitcraze/crazyflie-clients-python
I have also tried running ramp.py from the crazyflie-lib-python master folder, but I get the same output:

Code: Select all

phillip@saturn:~/Downloads/crazyflie-lib-python$ python ./examples/ramp.py
Scanning interfaces for Crazyflies...
Crazyflies found:
radio://0/30/1M
Connecting to radio://0/30/1M
Exception in thread Thread-173 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
  File "/usr/lib/python2.7/threading.py", line 763, in run
  File "./examples/ramp.py", line 101, in _ramp_motors
  File "/home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/__init__.py", line 250, in close_link
  File "/home/phillip/Downloads/crazyflie-lib-python/cflib/utils/callbacks.py", line 54, in call
  File "/home/phillip/Downloads/crazyflie-lib-python/cflib/crazyflie/param.py", line 246, in _disconnected
<type 'exceptions.TypeError'>: 'NoneType' object is not callable
I do have python v3.4.3 also installed, but I don't believe you can run the example files using python v3. If I try to run ramp.py using python 3, I cannot even connect to the CrazyFlie:

Code: Select all

phillip@saturn:~/Downloads/crazyflie-lib-python$ python3 ./examples/ramp.py 
Scanning interfaces for Crazyflies...
Crazyflies found:
radio://0/30/1M
radio://0/33/1M
Connecting to radio://0/30/1M
I can run the basiclog.py[\b] example fine just fine, but for some strange reason this file is not working properly for me. This is really frustrating as I want to modify the file and begin experimenting with the CF2 :(
phillipz
Beginner
Posts: 8
Joined: Sun Jun 19, 2016 10:56 pm

Re: Exception When Compiling ramp.py Example

Post by phillipz »

Any advice would be really appreciated, I would really like to get this working
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Exception When Compiling ramp.py Example

Post by marcus »

Hi,

I've tested this with the latest version of the crazyflie-lib-python (86a1e6b9770b24b3e934cafc6731540ae44c8dea) and it's working for me. Did you try cloning the crazyflie-lib-python and installing it in "Editable mode" (see the README for more information)?

/Marcus
phillipz
Beginner
Posts: 8
Joined: Sun Jun 19, 2016 10:56 pm

Re: Exception When Compiling ramp.py Example

Post by phillipz »

Hi,

Yes I did follow the instructions in the Readme. I will try deleting my VM and reinstalling from scratch - hopefully this fixes my problem.

Thanks,
Phillip
Post Reply