Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jrnl crashes on start with Windows ActivePython due to readline #738

Closed
micahellison opened this issue Nov 12, 2019 · 4 comments
Closed
Assignees
Labels
bug Something isn't working windows
Milestone

Comments

@micahellison
Copy link
Member

Bug report

  • Please tell us about your environment:

    • Jrnl version: 2.1.0
    • How you installed Jrnl: see below
    • Operating system [MacOS, Linux, Windows?] Windows 10
  • What is the current behavior?
    I didn't have this problem until I started using poetry, which uses ActivePython when I kick off a shell. It turns out that ActivePython isn't compatible with the GNU license, and the readline module is GNU, so it simple doesn't provide that module.

As far as I can tell, this needs to be resolved to enable a Windows build in Travis.

  • Please provide the steps to reproduce and if possible a minimal demo of the problem
    From the console:
C:\dev\jrnl>poetry shell
Spawning shell within C:\Users\micah\AppData\Local\pypoetry\Cache\virtualenvs\jrnl-py3.7
Microsoft Windows [Version 10.0.17763.805]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\dev\jrnl>poetry install
Installing dependencies from lock file

Nothing to install or update

  - Installing jrnl (v2.1.post2)

C:\dev\jrnl>jrnl
Traceback (most recent call last):
  File "C:\Users\micah\AppData\Local\pypoetry\Cache\virtualenvs\jrnl-py3.7\Scripts\jrnl-script.py", line 11, in <module>
    load_entry_point('jrnl', 'console_scripts', 'jrnl')()
  File "C:\Users\micah\AppData\Local\pypoetry\Cache\virtualenvs\jrnl-py3.7\lib\site-packages\pkg_resources\__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "C:\Users\micah\AppData\Local\pypoetry\Cache\virtualenvs\jrnl-py3.7\lib\site-packages\pkg_resources\__init__.py", line 2793, in load_entry_point
    return ep.load()
  File "C:\Users\micah\AppData\Local\pypoetry\Cache\virtualenvs\jrnl-py3.7\lib\site-packages\pkg_resources\__init__.py", line 2411, in load
    return self.resolve()
  File "C:\Users\micah\AppData\Local\pypoetry\Cache\virtualenvs\jrnl-py3.7\lib\site-packages\pkg_resources\__init__.py", line 2417, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "c:\dev\jrnl\jrnl\cli.py", line 11, in <module>
    from . import install
  File "c:\dev\jrnl\jrnl\install.py", line 3, in <module>
    import readline
ModuleNotFoundError: No module named 'readline'

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

Looks like maybe pyreadline is a good alternative? Except the max Python version it supports is 3.5.
https://pypi.org/project/pyreadline/

@micahellison micahellison added bug Something isn't working windows labels Nov 12, 2019
@zeruhur
Copy link

zeruhur commented Nov 12, 2019

Same for me...
just installed jrnl on windows via pip,
when I call it this traceback is displayed:

Traceback (most recent call last):
  File "c:\program files\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\program files\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\Python37\Scripts\jrnl.exe\__main__.py", line 5, in <module>
  File "c:\program files\python37\lib\site-packages\jrnl\cli.py", line 14, in <module>
    from . import install
  File "c:\program files\python37\lib\site-packages\jrnl\install.py", line 5, in <module>
    import readline
ModuleNotFoundError: No module named 'readline'

@moin1958
Copy link

I just installed jrnl on windows 10 via pip after installing python 3.7,
when I call it this traceback is displayed:

Traceback (most recent call last):
File "c:\program files\python37\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\program files\python37\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Program Files\Python37\Scripts\jrnl.exe_main
.py", line 5, in
File "c:\program files\python37\lib\site-packages\jrnl\cli.py", line 14, in
from . import install
File "c:\program files\python37\lib\site-packages\jrnl\install.py", line 5, in
import readline
ModuleNotFoundError: No module named 'readline'

Please advise any solution and how to start jrnl?

@wren
Copy link
Member

wren commented Jan 20, 2020

@moin1958 What version of jrnl do you have installed? There was a fix for this crash in v2.1.1. Do you have an older version? If so, please reinstall jrnl and try again.

@codeslord
Copy link

Install pyreadline instead of readline.

pip install pyreadline

This should fix the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows
Projects
None yet
Development

No branches or pull requests

5 participants