# Qutebrowser - importer.py



## fernandel (Feb 4, 2022)

Hi!

I made mistake and delete quickmarks in www/qutebrowser. I tried again imoprt from www/firefox but I have a problem now.

```
locate imoprter.py
/usr/home/fernandel/Downloads/importer.py
/usr/local/lib/python3.8/site-packages/gi/importer.py
/usr/local/lib/python3.8/site-packages/sphinx/ext/autodoc/importer.py
/usr/ports/security/pwman3/files/patch-pwman-exchange_importer.py
```


```
python /usr/home/fernandel/Downloads/importer.py bookmarks.html >> ~/.config/qutebrowser/quickmarks
Traceback (most recent call last):
  File "/usr/home/fernandel/Downloads/importer.py", line 342, in <module>
    main()
  File "/usr/home/fernandel/Downloads/importer.py", line 69, in main
    import_function[input_format](args.bookmarks, bookmark_types,
  File "/usr/home/fernandel/Downloads/importer.py", line 189, in import_html_bookmarks
    import bs4
ModuleNotFoundError: No module named 'bs4'
```
Above is importer.py which I downloded long time ago from github. Than I tried:

```
python /usr/local/lib/python3.8/site-packages/gi/importer.py bookmarks.html >> ~/.config/qutebrowser/quickmarks

  python /usr/local/lib/python3.8/site-packages/gi/importer.py bookmarks.html >> ~/.config/qutebrowser/quickmark
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/gi/importer.py", line 30, in <module>
    from ._gi import Repository, RepositoryError
ImportError: attempted relative import with no known parent package
```

Thank you.


----------



## T-Daemon (Feb 5, 2022)

fernandel said:


> Above is importer.py which I downloded long time ago from github.


Try the latest: https://raw.githubusercontent.com/qutebrowser/qutebrowser/master/scripts/importer.py



fernandel said:


> Than I tried:
> 
> ```
> python /usr/local/lib/python3.8/site-packages/gi/importer.py
> ```


That importer.py script has nothing to do with www/qutebrowser.


----------



## fernandel (Feb 5, 2022)

T-Daemon said:


> Try the latest: https://raw.githubusercontent.com/qutebrowser/qutebrowser/master/scripts/importer.py
> 
> 
> That importer.py script has nothing to do with www/qutebrowser.


I do not know why I shows all three... Mine works on Firefox 64 but now I have 96. Thank you for the link if is different than mine.


----------



## T-Daemon (Feb 5, 2022)

fernandel said:


> I do not know why I shows all three...


Those other two


fernandel said:


> /usr/local/lib/python3.8/site-packages/gi/importer.py
> /usr/local/lib/python3.8/site-packages/sphinx/ext/autodoc/importer.py


are files installed by other packages.

To display which package has installed a specific file use pkg-which(8).


----------



## fernandel (Feb 5, 2022)

Mine downloaded importer.py is the same as in in the link which you are posted. I did everything  what `importer.py -h` shows but nothing.
Thank you.


----------



## T-Daemon (Feb 5, 2022)

The importer.py script has

```
#!/usr/bin/env python3
```
as environment.

Try changing to `python3.8`.


----------



## fernandel (Feb 5, 2022)

No, it doesn't work. The same problem. I will ask on Qutebrowser mailing list.
Thank you.


----------



## fernandel (Feb 8, 2022)

I got an aswer about importer.py:


> pip install bs4
> 
> will fix you module error.  Not sure if FreeBSD
> has an alias for pip. On OpenBSD I use "pip3.8 install "


But I think we do not have "pip".


----------



## T-Daemon (Feb 8, 2022)

Try devel/py-pip, package name py38-pip.


----------

