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

Stuck on "Send to JabRef" #99

Closed
jorgman1 opened this issue Nov 20, 2019 · 8 comments · Fixed by JabRef/jabref#5649
Closed

Stuck on "Send to JabRef" #99

jorgman1 opened this issue Nov 20, 2019 · 8 comments · Fixed by JabRef/jabref#5649
Labels
status:accepted status:jabref A bug or issue that depends on a change to JabRef itself type:bug

Comments

@jorgman1
Copy link

I get the following error.
Firefox: 70.0.1
Extension: 2.1.2 (Last updated 2019-11-19)
JabRef: 5.0.0 (2019-11-19)
OS: Linux Mint 18.1

stderr output from native app org.jabref.jabref: File "/opt/jabref/lib/jabrefHost.py", line 34
stderr output from native app org.jabref.jabref: logging.info(f"Got length: {message_length} bytes to be read")
stderr output from native app org.jabref.jabref: ^
stderr output from native app org.jabref.jabref: SyntaxError: invalid syntax
stderr output from native app org.jabref.jabref: Error in sys.excepthook:
stderr output from native app org.jabref.jabref: Traceback (most recent call last):
stderr output from native app org.jabref.jabref: File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 145, in apport_excepthook
stderr output from native app org.jabref.jabref: os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o640), 'wb') as f:
stderr output from native app org.jabref.jabref: FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_opt_jabref_lib_jabrefHost.py.1001.crash'
stderr output from native app org.jabref.jabref:
stderr output from native app org.jabref.jabref: Original exception was:
stderr output from native app org.jabref.jabref: File "/opt/jabref/lib/jabrefHost.py", line 34
stderr output from native app org.jabref.jabref: logging.info(f"Got length: {message_length} bytes to be read")
stderr output from native app org.jabref.jabref: ^
stderr output from native app org.jabref.jabref: SyntaxError: invalid syntax

@tobiasdiez
Copy link
Member

@LyzardKing can you have a look at this please. Seems to be related to your recent changes.

@tobiasdiez tobiasdiez added status:accepted status:jabref A bug or issue that depends on a change to JabRef itself type:bug labels Nov 20, 2019
@LyzardKing
Copy link
Collaborator

I can't replicate, but the issue might be that Linux Mint uses an older version of Python3 that doesn't have support for fstrings..
If that's the case we might need to revert that change.
I'll look into it today and determine if that is the issue

@LyzardKing
Copy link
Collaborator

It is a release from 2016-12-16, so that might in fact be the issue

@LyzardKing
Copy link
Collaborator

@jorgman1 I uploaded a branch with a possible fix.
You can test it from https://builds.jabref.org/removeFstring/

@jorgman1
Copy link
Author

@LyzardKing: I get the following error now:
(I'm using Python 3.5.2)

stderr output from native app org.jabref.jabref: Traceback (most recent call last):
stderr output from native app org.jabref.jabref: File "/opt/jabref/lib/jabrefHost.py", line 25, in
stderr output from native app org.jabref.jabref: logging.basicConfig(filename=logging_dir / "jabref_browser_extension.log")
stderr output from native app org.jabref.jabref: File "/usr/lib/python3.5/logging/init.py", line 1744, in basicConfig
stderr output from native app org.jabref.jabref: h = FileHandler(filename, mode)
stderr output from native app org.jabref.jabref: File "/usr/lib/python3.5/logging/init.py", line 998, in init
stderr output from native app org.jabref.jabref: self.baseFilename = os.path.abspath(filename)
stderr output from native app org.jabref.jabref: File "/usr/lib/python3.5/posixpath.py", line 357, in abspath
stderr output from native app org.jabref.jabref: if not isabs(path):
stderr output from native app org.jabref.jabref: File "/usr/lib/python3.5/posixpath.py", line 64, in isabs
stderr output from native app org.jabref.jabref: return s.startswith(sep)
stderr output from native app org.jabref.jabref: AttributeError: 'PosixPath' object has no attribute 'startswith'
stderr output from native app org.jabref.jabref: Error in sys.excepthook:
stderr output from native app org.jabref.jabref: Traceback (most recent call last):
stderr output from native app org.jabref.jabref: File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 145, in apport_excepthook
stderr output from native app org.jabref.jabref: os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o640), 'wb') as f:
stderr output from native app org.jabref.jabref: FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_opt_jabref_lib_jabrefHost.py.1001.crash'
stderr output from native app org.jabref.jabref:
stderr output from native app org.jabref.jabref: Original exception was:
stderr output from native app org.jabref.jabref: Traceback (most recent call last):
stderr output from native app org.jabref.jabref: File "/opt/jabref/lib/jabrefHost.py", line 25, in
stderr output from native app org.jabref.jabref: logging.basicConfig(filename=logging_dir / "jabref_browser_extension.log")
stderr output from native app org.jabref.jabref: File "/usr/lib/python3.5/logging/init.py", line 1744, in basicConfig
stderr output from native app org.jabref.jabref: h = FileHandler(filename, mode)
stderr output from native app org.jabref.jabref: File "/usr/lib/python3.5/logging/init.py", line 998, in init
stderr output from native app org.jabref.jabref: self.baseFilename = os.path.abspath(filename)
stderr output from native app org.jabref.jabref: File "/usr/lib/python3.5/posixpath.py", line 357, in abspath
stderr output from native app org.jabref.jabref: if not isabs(path):
stderr output from native app org.jabref.jabref: File "/usr/lib/python3.5/posixpath.py", line 64, in isabs
stderr output from native app org.jabref.jabref: return s.startswith(sep)
stderr output from native app org.jabref.jabref: AttributeError: 'PosixPath' object has no attribute 'startswith'

@LyzardKing
Copy link
Collaborator

This seems to be an issue with the logging module..not with jabref..
https://bugs.python.org/issue27493
I pushed a new commit..as soon as it builds and uploads you can try again and see if it fixes the problems.

@jorgman1
Copy link
Author

Works like a charm now! Thank you!
What did you change?

@LyzardKing
Copy link
Collaborator

As noted in the linked url, the versions of the logging module available
in python3.5 and previous only work with a string as a parameter, not a pathlib object.
So I converted the pathlib object to a string in the logging setup :)
Thank you for testing it!
Now the PR on the main repo can be merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:accepted status:jabref A bug or issue that depends on a change to JabRef itself type:bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants