Joelzeller / CoPilot

Raspberry Pi powered in-car infotainment system
http://joelzeller.wixsite.com/copilot
121 stars 38 forks source link

im getting the error: Unable to import package 'mapview.MapSource' #7

Open rcpilotp51 opened 6 years ago

rcpilotp51 commented 6 years ago

in main.kv error:

`Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/kivy/lang/parser.py", line 464, in execute_directives mod = import('.'.join(package.split('.')[:-1])) File "/home/pi/CoPilot/mapview/init.py", line 30, in from mapview.source import MapSource File "/home/pi/CoPilot/mapview/source.py", line 8, in from mapview.downloader import Downloader File "/home/pi/CoPilot/mapview/downloader.py", line 8, in from concurrent.futures import ThreadPoolExecutor, TimeoutError, as_completed ImportError: No module named concurrent.futures Traceback (most recent call last): File "main.py", line 2077, in MainApp().run() File "/usr/local/lib/python2.7/dist-packages/kivy/app.py", line 799, in run self.load_kv(filename=self.kv_file) File "/usr/local/lib/python2.7/dist-packages/kivy/app.py", line 596, in load_kv root = Builder.load_file(rfilename) File "/usr/local/lib/python2.7/dist-packages/kivy/lang/builder.py", line 301, in load_file return self.load_string(data, **kwargs) File "/usr/local/lib/python2.7/dist-packages/kivy/lang/builder.py", line 350, in load_string parser = Parser(content=string, filename=fn) File "/usr/local/lib/python2.7/dist-packages/kivy/lang/parser.py", line 392, in init self.parse(content) File "/usr/local/lib/python2.7/dist-packages/kivy/lang/parser.py", line 498, in parse self.execute_directives() File "/usr/local/lib/python2.7/dist-packages/kivy/lang/parser.py", line 475, in execute_directives package) kivy.lang.parser.ParserException: Parser: File "/home/pi/CoPilot/main.kv", line 31: ... 29:#:import MDThemePicker kivymd.theme_picker.MDThemePicker 30:#:import math math

31:#:import MapSource mapview.MapSource 32: 33:#on_press: Animation(x=newposition or y=newposition).start(id) #to animate things ... Unable to import package 'mapview.MapSource' `

rcpilotp51 commented 6 years ago

the above is when i run launcher.sh...when i just call main.py:

Traceback (most recent call last): File "main.py", line 2077, in MainApp().run() File "/usr/local/lib/python2.7/dist-packages/kivy/app.py", line 799, in run self.load_kv(filename=self.kv_file) File "/usr/local/lib/python2.7/dist-packages/kivy/app.py", line 596, in load_kv root = Builder.load_file(rfilename) File "/usr/local/lib/python2.7/dist-packages/kivy/lang/builder.py", line 301, in load_file return self.load_string(data, **kwargs) File "/usr/local/lib/python2.7/dist-packages/kivy/lang/builder.py", line 382, in load_string self._apply_rule(widget, parser.root, parser.root) File "/usr/local/lib/python2.7/dist-packages/kivy/lang/builder.py", line 567, in _apply_rule self._apply_rule(child, crule, rootrule) File "/usr/local/lib/python2.7/dist-packages/kivy/lang/builder.py", line 567, in _apply_rule self._apply_rule(child, crule, rootrule) File "/usr/local/lib/python2.7/dist-packages/kivy/lang/builder.py", line 567, in _apply_rule self._apply_rule(child, crule, rootrule) File "/usr/local/lib/python2.7/dist-packages/kivy/lang/builder.py", line 564, in _apply_rule child = cls(__no_builder=True) File "/home/pi/CoPilot/mapview/view.py", line 496, in init self.add_widget(self._scatter) File "/home/pi/CoPilot/mapview/view.py", line 543, in add_widget super(MapView, self).add_widget(widget) File "/usr/local/lib/python2.7/dist-packages/kivy/uix/widget.py", line 534, in add_widget widget._disabled_count = self._disabled_count AttributeError: 'MapView' object has no attribute '_disabled_count'

rcpilotp51 commented 6 years ago

Joelzeller - has the way to import the mapview changed? I'm not familiar with the syntax. Any help would be appreciated. Thank you!

rcpilotp51 commented 6 years ago

@Joelzeller

asmith2073 commented 6 years ago

@rcpilotp51 I ran into the same problem, turns out its a bug in mapview. Reinstall mapview (Or replace view/py with their new one) and it should work! It was a known bug that they fixed.

Thanks

asmith2073 commented 6 years ago

Link for help

https://github.com/kivy-garden/garden.mapview/commit/25c3ba7bac95e7d740a83fd151057486527327d5#diff-9b3af85c414e5903fe1cda597eb6e3dfR306

rcpilotp51 commented 6 years ago

Thanks I'll give that a try this evening!

On Thu, Mar 29, 2018 at 12:10 AM, asmith2073 notifications@github.com wrote:

Link for help

kivy-garden/garden.mapview@25c3ba7#diff-9b3af85c414e5903fe1cda597eb6e3 dfR306 https://github.com/kivy-garden/garden.mapview/commit/25c3ba7bac95e7d740a83fd151057486527327d5#diff-9b3af85c414e5903fe1cda597eb6e3dfR306

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Joelzeller/CoPilot/issues/7#issuecomment-377115469, or mute the thread https://github.com/notifications/unsubscribe-auth/APGf8q2dH8lYU-3Q1H1uCSfz9oBs0b0Jks5tjF64gaJpZM4SiBFp .

rcpilotp51 commented 6 years ago

@asmith2073 do you have a fork of it running completely? if so are you able to push it to the repo or create a new one?