Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    'module' object has no attribute 'BH1750FVI'

    Scheduled Pinned Locked Moved WiPy 2&3
    4 Posts 3 Posters 22 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      sung-pil kim 0
      last edited by

      hi~

      In web page(https://docs.pycom.io/tutorials/hardware/i2c/),

      When I run code main.py, AttributeError : 'module' object has no attribute 'BH1750FVI'
      The files, bh1750fvi.py and main.py are saved in same folder.

      What I check? please~

      1 Reply Last reply Reply Quote 0
      • M Offline
        Matthew Felgate 0 Global Moderator
        last edited by

        Hi Sung-Pil Kim

        I have just checked this myself and it appears to import. Is the file bh1750fvi.py definitely uploaded to the board?

        May I check which board and expansion board are you using.

        Kind Regards
        Matthew

        1 Reply Last reply Reply Quote 0
        • L Offline
          livius
          last edited by

          @sung-pil-kim-0:
          you must tell us more basic informations like hardware used and other thigs. Foto of setup will be also helpfull.

          When I run code main.py,

          how do you run the code?

          think about people first, then computers

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sung-pil kim 0 @livius
            last edited by

            @livius Thank you very much for your answer.
            I have WiPy 3.0 and Expansion board 3.0. I 'run' the code(run button click)

            Today(2021-02-19) I uploaded the code(main.py and bh1750fvi.py).
            It works!!

            Thank you.

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post

            Pycom on Twitter

            Pycom