You are not logged in.

#1 2021-01-29 18:23:01

shoelesshunter
Member
From: USA
Registered: 2014-05-18
Posts: 289

[solved]python application misbehaving

I am trying to run the journaling software, 'rednotebook' from the community repo. I get the following error on launch:

Traceback (most recent call last):
  File "/usr/bin/rednotebook", line 9, in <module>
    journal.main()
AttributeError: module 'journal' has no attribute 'main'

This happens with both the community version and the ARU git version of the software.

Last edited by shoelesshunter (2021-01-31 07:28:08)

Offline

#2 2021-01-29 19:00:08

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,098

Re: [solved]python application misbehaving

What's the output of

python -c "import journal; print(journal.__file__)"

Offline

#3 2021-01-30 23:11:58

shoelesshunter
Member
From: USA
Registered: 2014-05-18
Posts: 289

Re: [solved]python application misbehaving

/home/jmgant/.local/lib/python3.9/site-packages/journal/__init__.py

so it seems it is looking for a local package, when rednotebook is a system packages.

I really don't understand how python works yet.

Offline

#4 2021-01-30 23:37:06

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,560

Re: [solved]python application misbehaving

It looks like you installed a journal package with pip --user, and that's overriding the system one. That's what's causing your problem.

Offline

#5 2021-01-30 23:56:15

shoelesshunter
Member
From: USA
Registered: 2014-05-18
Posts: 289

Re: [solved]python application misbehaving

I did 'sudo pip install journal' and get the same error. should I just uninstall the local version?

Offline

#6 2021-01-31 04:33:16

shoelesshunter
Member
From: USA
Registered: 2014-05-18
Posts: 289

Re: [solved]python application misbehaving

rednotebook did not install 'journal' by default at all. I uninstalled the user package as well as the system package, reinstalled rednotebook and now get this error:

  File "/usr/bin/rednotebook", line 6, in <module>
    import journal
ModuleNotFoundError: No module named 'journal'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/rednotebook", line 12, in <module>
    import rednotebook.journal
  File "/usr/lib/python3.9/site-packages/rednotebook/journal.py", line 169, in <module>
    from rednotebook.gui.main_window import MainWindow
  File "/usr/lib/python3.9/site-packages/rednotebook/gui/main_window.py", line 29, in <module>
    from rednotebook.gui import (
  File "/usr/lib/python3.9/site-packages/rednotebook/gui/browser_cef.py", line 29, in <module>
    from cefpython3 import cefpython as cef
  File "/home/jmgant/.local/lib/python3.9/site-packages/cefpython3/__init__.py", line 64, in <module>
    raise Exception("Python version not supported: " + sys.version)
Exception: Python version not supported: 3.9.1 (default, Dec 13 2020, 11:55:53) 
[GCC 10.2.0]

Help with this would really be great, I was using this software heavily for daily stuff and now won't install/run.

Offline

#7 2021-01-31 04:44:50

shoelesshunter
Member
From: USA
Registered: 2014-05-18
Posts: 289

Re: [solved]python application misbehaving

sorry to keep responding. I installed python3.8 from the AUR, but I have no idea how to use an alternate python.

Offline

#8 2021-01-31 04:49:33

loqs
Member
Registered: 2014-03-06
Posts: 17,373

Re: [solved]python application misbehaving

Create a new user to avoid all the pip user installed packages.  Does  executing rednotebook as the new user produce any errors?

Offline

#9 2021-01-31 06:12:45

shoelesshunter
Member
From: USA
Registered: 2014-05-18
Posts: 289

Re: [solved]python application misbehaving

sudo rednotebook works just fine. but that is not a solution.

Offline

#10 2021-01-31 06:58:38

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [solved]python application misbehaving

loqs wrote:

Create a new user to avoid all the pip user installed packages.  Does  executing rednotebook as the new user produce any errors?

shoelesshunter wrote:

sudo rednotebook works just fine. but that is not a solution.

Are you deliberately ignoring loqs, or are you that clueless. Elevating privileges is neither what he asked you to do, nor what any vaguely competent person would try.

Either follow the requests of the people trying to help you, or stop posting here: you are wasting everyone's time, including your own.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#11 2021-01-31 07:15:12

zaxdan69
Member
Registered: 2016-06-04
Posts: 273

Re: [solved]python application misbehaving

I had problems with pip installed packages conflicts in arch in the past and I avoid to install anything with pip, or use a virtual environment for pip installations. I just installed rednotebook and runs fine. So seems that the problem comes from pip installed packages.
The "module not found" error for journal indicates that the file journal.py(which is in /lib/python3.9/site-packages/rednotebook directory) cannot be found. This kind of problems started with python 3.9(I had some with other applications), but usually solved with a reinstallation of the application. In your case seems that this doesn' t work, probably because you have pip installed packages which rednotebook has as dependencies.
As this package:

    from cefpython3 import cefpython as cef
  File "/home/jmgant/.local/lib/python3.9/site-packages/cefpython3/__init__.py", line 64, in <module>
    raise Exception("Python version not supported: " + sys.version)
Exception: Python version not supported: 3.9.1 (default, Dec 13 2020, 11:55:53) 
[GCC 10.2.0]

From the above error seems that the application trying to use the cefpython3 package from your local installation(installed by pip -user). So, you can try to uninstall it and reinstall rednotebook. But maybe you have some other packages there which also need to get rid of them.

Offline

#12 2021-01-31 07:27:43

shoelesshunter
Member
From: USA
Registered: 2014-05-18
Posts: 289

Re: [solved]python application misbehaving

yes removing cefpython3 with pip and reinstalling rednotebook did the trick. thanks.

Offline

Board footer

Powered by FluxBB