element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Error message in Sense HAT marble run code
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 3 replies
  • Subscribers 665 subscribers
  • Views 353 views
  • Users 0 members are here
  • raspberry_pi_getting_started
Related

Error message in Sense HAT marble run code

matthew.scott7
matthew.scott7 over 9 years ago

Hi. I've been trying to run the Sense HAT marble run code for the Rasberry Pi https://www.raspberrypi.org/learning/sense-hat-marble-maze/

 

And I get this error:

 

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sense_hat/sense_hat.py", line 734, in get_orientation
    return self.get_orientation_degrees()
  File "/usr/lib/python3/dist-packages/sense_hat/sense_hat.py", line 727, in get_orientation_degrees
    orientation = self.get_orientation_radians()
  File "/usr/lib/python3/dist-packages/sense_hat/sense_hat.py", line 706, in get_orientation_radians
    raw = self._get_raw_data('fusionPoseValid', 'fusionPose')
  File "/usr/lib/python3/dist-packages/sense_hat/sense_hat.py", line 688, in _get_raw_data
    if self._read_imu():
  File "/usr/lib/python3/dist-packages/sense_hat/sense_hat.py", line 669, in _read_imu
    self._init_imu()  # Ensure imu is initialised
  File "/usr/lib/python3/dist-packages/sense_hat/sense_hat.py", line 633, in _init_imu
    raise OSError('IMU Init Failed, please run as root / use sudo')
OSError: IMU Init Failed, please run as root / use sudo

 

Can someone help me debug?

  • Sign in to reply
  • Cancel
  • gadget.iom
    0 gadget.iom over 9 years ago

    Try typing "sudo " at the start of the command you're running.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • matthew.scott7
    0 matthew.scott7 over 9 years ago in reply to gadget.iom

    I'm launching the code within the IDLE 3 app within the X GUI (Rasperian NOOBS).

     

    Just adding sudo gives a error message, sudo undefined...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • matthew.scott7
    0 matthew.scott7 over 9 years ago in reply to gadget.iom

    Launching from LX Terminal using Python3 gives me the same error...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube