Skip to content
This repository has been archived by the owner on Apr 19, 2020. It is now read-only.

Unresolved import: kivy.garden.mapview #7

Closed
jadgsam opened this issue Jan 2, 2016 · 7 comments
Closed

Unresolved import: kivy.garden.mapview #7

jadgsam opened this issue Jan 2, 2016 · 7 comments

Comments

@jadgsam
Copy link

jadgsam commented Jan 2, 2016

Hi,
I am trying to use mapview module but I am facing a couple of issues.

The following statement in any of the examples,
Import kivy.garden.mapview

Isn't working properly, I have installed this module by following 2 different approaches

  1. Followed the instructions https://github.com/kivy-garden/garden.mapview

  2. Copied the package from original location to /Applications/Kivy.app/Contents/Resources/.kivy/garden

This works from Eclipse even though is raising an Error saying "Unresolved import: kivy.garden.mapview"

The real problem is when I try to use xcode and I get the following error:

Traceback (most recent call last):
File "/Users/jadsam/Documents/workspace/AcaProject/primero/kivy-ios/mapex1test-ios/YourApp/main.py", line 3, in
ImportError: No module named mapview
2016-01-02 08:27:29.032 mapex1test[19067:483831] Application quit abnormally!
2016-01-02 08:27:29.036 mapex1test[19067:483831] Leaving

My environment is a new MacbookPro and I have not experience on Kivy, these are my first attempts on this framework

@jadgsam
Copy link
Author

jadgsam commented Jan 2, 2016

I was able to remove Eclipse warnings after installing mapview in the application path with this command "garden install --app mapview".
However the application fails in Xcode

2016-01-02 09:44:42.647 mapex2test[20190:528036] Available orientation: KIVY_ORIENTATION=LandscapeLeft LandscapeRight Portrait PortraitUpsideDown
2016-01-02 09:44:42.648 mapex2test[20190:528036] PythonHome is: /Users/jadsam/Library/Developer/CoreSimulator/Devices/6357D9FA-9018-486E-ABE8-94E4E4F52C79/data/Containers/Bundle/Application/A2F6E1A0-7704-4161-8EBC-7F2A9C548D1C/mapex2test.app
2016-01-02 09:44:42.648 mapex2test[20190:528036] Initializing python
2016-01-02 09:44:42.708 mapex2test[20190:528036] Running main.pyo: /Users/jadsam/Library/Developer/CoreSimulator/Devices/6357D9FA-9018-486E-ABE8-94E4E4F52C79/data/Containers/Bundle/Application/A2F6E1A0-7704-4161-8EBC-7F2A9C548D1C/mapex2test.app/YourApp/main.pyo
Traceback (most recent call last):
File "/Users/jadsam/Documents/workspace/AcaProject/primero/kivy-ios/mapex2test-ios/YourApp/main.py", line 2, in
ImportError: No module named mapview
2016-01-02 09:44:42.709 mapex2test[20190:528036] Application quit abnormally!
2016-01-02 09:44:42.713 mapex2test[20190:528036] Leaving

@mrhdias
Copy link

mrhdias commented Feb 8, 2016

I have some problem with Xcode. Any ideas on how to solve this issue??

@dessant
Copy link

dessant commented Feb 24, 2016

@tito ping.

@tito
Copy link
Contributor

tito commented Feb 24, 2016

It's an issue on kivy garden path on iOS. I always forgot to push a fix in kivy, sorry.
In the meantime, you can add in your main.py prior any garden import:

from kivy.utils import platform
if platform == "ios":
    from os.path import join, dirname
    import kivy.garden
    kivy.garden.garden_app_dir = join(dirname(__file__), "libs", "garden")

@cristofer100
Copy link

Hi @tito I tried segment code above but still returning ¨ImportError: No module named garden.mapview¨any update workaround? thanks in advance boss

@utthawut
Copy link

I faced issue KeyError: 'kivy.garden.graph' when using Xcode.
I already perform "./toolchain.py pip install kivy-garden" and did try suggestion from @tito above but the issue cannot be fixed.

[INFO ] [Kivy ] v1.10.1
[INFO ] [Python ] v3.7.1 (default, Jul 29 2019, 08:48:33)
[Clang 10.0.1 (clang-1001.0.46.4)]
[INFO ] [Factory ] 194 symbols loaded
[INFO ] [Image ] Providers: img_imageio, img_tex (img_dds, img_sdl2, img_ffpyplayer, img_pil, img_gif ignored)
[INFO ] [KivyMD ] KivyMD version: 0.1.2
[INFO ] [Text ] Provider: sdl2
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL ES 2" graphics system
[INFO ] [GL ] Backend used
[INFO ] [GL ] OpenGL version <b'OpenGL ES 2.0 APPLE-17.0.77'>
[INFO ] [GL ] OpenGL vendor <b'Apple Inc.'>
[INFO ] [GL ] OpenGL renderer <b'Apple Software Renderer'>
[INFO ] [GL ] OpenGL parsed version: 2, 0
[INFO ] [GL ] Shading version <b'OpenGL ES GLSL ES 1.00'>
[INFO ] [GL ] Texture max size <4096>
[INFO ] [GL ] Texture max units <8>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
Got dlopen error on Foundation: dlopen(/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation, 1): no suitable image found. Did find:
/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation: mach-o, but not built for iOS simulator
Got fallback dlopen error on Foundation: dlopen(/Groups/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation, 1): image not found
Traceback (most recent call last):
File "/Users/utthawut/KivyApp/kivy-ios/smarthydro-ios/YourApp/main.py", line 40, in
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 668, in _load_unlocked
File "", line 640, in _load_backward_compatible
KeyError: 'kivy.garden.graph'

@matham
Copy link
Member

matham commented Dec 22, 2019

kivy/kivy#6658

@matham matham closed this as completed Dec 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants