Python Forum
Error when running kivy on python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error when running kivy on python
#1
desktop pc, win 10 , python 3.11, kivy 2.2

Hello. I am trying to run this code to confirm setup before I dive into python and kivy trying to achieve my goal.
The code is from an slightly changed example, viewing a youtube video.
The result should show a map beeing able to zoom and a position on map.
Any wizzards out there who can help me code to work?
Is this error due to wrong setup of python (no indication during setup of erroor),or programming?
Thank you for any guideance.

Here is the code:
import kivy
kivy.require('2.2.0') # replace with your current kivy version !

from kivymd.app import MDAppApp
from kivy_garden.mapview import MapView


class MyApp(MDApp):

    def build(self):
    mapview = MapView(zoom=10, Lat=36, Lon=-115)
        return mapview
        
    MapViewApp().run()[error]IndentationError: expected an indented block after function definition on line 10[output]None observed[/output][/error]
Reply


Messages In This Thread
Error when running kivy on python - by janeik - Jun-16-2023, 01:21 PM
RE: Error when running kivy on python - by janeik - Jun-16-2023, 04:20 PM
RE: Error when running kivy on python - by janeik - Jun-16-2023, 07:05 PM
RE: Error when running kivy on python - by janeik - Jun-16-2023, 07:12 PM
RE: Error when running kivy on python - by janeik - Jun-16-2023, 08:55 PM
RE: Error when running kivy on python - by janeik - Jun-16-2023, 10:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  error "cannot identify image file" part way through running hatflyer 0 800 Nov-02-2023, 11:45 PM
Last Post: hatflyer
  Getting error when running "MINUS" between 2 databases marlonbown 4 1,396 Nov-10-2022, 05:49 AM
Last Post: deanhystad
  Error while running code on VSC maiya 4 3,995 Jul-01-2022, 02:51 PM
Last Post: maiya
  Pandas - error when running Pycharm, but works on cmd line zxcv101 1 1,422 Jun-18-2022, 01:09 PM
Last Post: snippsat
  Error when running a matplot lib example aurelius_nero 3 7,225 Apr-24-2022, 01:24 PM
Last Post: Axel_Erfurt
  Keep getting Session management error when running imshow in pycharm pace 0 2,183 Mar-25-2021, 10:06 AM
Last Post: pace
  Error when running script on startup in Linux NoahTheNerd 0 2,030 Mar-07-2021, 04:54 PM
Last Post: NoahTheNerd
  Error when running mktorrent subprocess command pythonnewbie138 4 4,000 Sep-16-2020, 01:55 AM
Last Post: pythonnewbie138
  error while running in debug mode ModuleNotFoundError avipy123 0 2,694 Jul-14-2020, 02:05 PM
Last Post: avipy123
  Generate RPM package from a Python + Kivy application for an "offline" installation pruvosim 2 2,304 Jun-04-2020, 12:16 PM
Last Post: pruvosim

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020