rawpython / remi

Python REMote Interface library. Platform independent. In about 100 Kbytes, perfect for your diet.
Apache License 2.0
3.48k stars 401 forks source link

AttributeError: module 'android' has not attribute 'webbrowser' (Ubuntu 20.04) #448

Closed amaank404 closed 3 years ago

amaank404 commented 3 years ago

I just installed remi through pip and was smart enough to figure out the command python3 -m editor opens remi WYSIWYG editor. but when i opened it. it showed this error:

remi.server      INFO     Started httpserver http://0.0.0.0:8082/
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/xcodz/.local/lib/python3.8/site-packages/editor/__main__.py", line 11, in <module>
    start(Editor, debug=False, address='0.0.0.0', port=8082, update_interval=0.01, multiple_instance=True)
  File "/home/xcodz/.local/lib/python3.8/site-packages/remi/server.py", line 925, in start
    s = Server(main_gui_class, start=True, **kwargs)
  File "/home/xcodz/.local/lib/python3.8/site-packages/remi/server.py", line 816, in __init__
    self.start()
  File "/home/xcodz/.local/lib/python3.8/site-packages/remi/server.py", line 844, in start
    android.webbrowser.open(self._base_address)
AttributeError: module 'android' has no attribute 'webbrowser'

After seeing the above, i knew that module android is installed but does not have any attribute webbrowser. I knew that android is not something that I installed so I tried to delete it but I quickly found out it was not installed through pip. Then I opened up a console and typed in the following:

>>> import android
>>> help(android)

and the result was:

Help on package android:

NAME
    android

PACKAGE CONTENTS

FILE
    (built-in)

To summarize:

The solution to the problem is easy by adding try...except block at that call. May I start a PR for the same? (I have managed to locally debug the error and make Remi work)

dddomodossola commented 3 years ago

Hello @xcodz-dot , yes please do a PR, thank you