wshanks / lyz

LyZ is a plugin for Zotero, which is intended to make working with LyX/Zotero more pleasant.
GNU General Public License v3.0
108 stars 13 forks source link

Wrong lyxpipe (Ubuntu 22.04) #43

Open petteriTeikari opened 1 year ago

petteriTeikari commented 1 year ago

Had not used LyZ/LyX for some time and ran into the the same problem reported for Windows when trying to work on an old document (with a lot of library and OS upgrades happening in between)

The specified LyXServer pipe does not exist.

Wrong path to Lyx server.
Set the path specified in Lyx preferences.

Could not contact server at: ~/.lyx/lyxpipe

Could not retrieve document name.

My LyX pipe should be correct with Reconfigure/Restart:

image

As well as the LyZ pipe

image

Fix attempts

with absolute path

The error message changes a bit when I try absolute path

image

SERVER ERROR:
[Exception... "Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIFileInputStream.init]"  nsresult: "0x80520015 (NS_ERROR_FILE_ACCESS_DENIED)"  location: "JS frame :: chrome://lyz/content/lyz.js :: lyxPipeInit :: line 113"  data: no]

Could not contact server at: /home/petteri/.lyx/lyxpipe

Could not retrieve document name.

Is this some permission issue then?

image

Or just some funky addon error in general? Or is it a problem with the database? Or a sync issue?

Clearing storage

No effect for hunting some read-only/locked attachments https://forums.zotero.org/discussion/comment/54918/#Comment_54918

"Reset File Sync History"

No effect: https://forums.zotero.org/discussion/comment/55324/#Comment_55324

Remove "translators"

No effect: https://forums.zotero.org/discussion/comment/274629/#Comment_274629

Remove snapshots

No effect: https://forums.zotero.org/discussion/comment/253346/#Comment_253346

System

Ubuntu 22.04 LTS LyX Version 2.3.6 Zotero 6.0.26 (snap install, Sync of the database from my Zotero account, with previous history of keeping the db on Dropbox) Lyz 4.1.2

Solution

Probably best then to just switch to Better BibTeX (BBT)?

wshanks commented 1 year ago

Probably best then to just switch to Better BibTeX (BBT)?

If that works for you, that seems like the simplest solution. Zotero 7 is a major overhaul of the Zotero codebase and requires extensive rework of addons. I have been leaning towards not porting LyZ to Zotero 7, so you would need to transition to a different workflow than using LyZ soon any way.

Regarding the issue, I wonder if LyX is also installed from a snap. I don't have much personal experience working with snaps, but I know they use a sandbox by default for security purposes, so I could see LyX and Zotero not being able to see each other's files out of the box. If you wanted to debug further, you could try changing the snap permissions or maybe just try running the Zotero binary from zotero.org as a test to see if it can see LyX's pipe.

petteriTeikari commented 1 year ago

Probably best then to just switch to Better BibTeX (BBT)?

If that works for you, that seems like the simplest solution. Zotero 7 is a major overhaul of the Zotero codebase and requires extensive rework of addons. I have been leaning towards not porting LyZ to Zotero 7, so you would need to transition to a different workflow than using LyZ soon any way.

I would really prefer keep on using LyZ as it is familiar to me so it seems like a backup solution,

Regarding the issue, I wonder if LyX is also installed from a snap. I don't have much personal experience working with snaps, but I know they use a sandbox by default for security purposes, so I could see LyX and Zotero not being able to see each other's files out of the box. If you wanted to debug further, you could try changing the snap permissions or maybe just try running the Zotero binary from zotero.org as a test to see if it can see LyX's pipe.

And indeed it seems to be the snap that was the issue, as when just using the standard tarball from Zotero's site, Zotero and LyX now see each other :) Thank you!

mukesh4iitb commented 3 months ago

Hi,

We have any solution for this yet?

I am having the same issue.

I am using lyz4.1.2 version and zotero 6.0.35 on ubuntu20.4 system.

mukesh4iitb commented 3 months ago

I am happily writing that I have resolved the issues after reading the comment by @shahahnshah at https://github.com/wshanks/lyz/issues/14. The issue was with LyX, and after upgrading LyX to the version of LyX 2.3.6.1 (2020-12-29), it is perfectly working with the above-mentioned Zotero 6.0.35 and Ubuntu 20.4 system. Thanks @shahahnshah

Finally, I would like to thank @wshanks for writing this. It is very good and saves me a lot of head because using better bibtex needs importing .bib file and then copying the citation-key form .bib file, and then pasting in the citation box of LyX. While LyZ, we can do it directly in one step.

I know it takes a lot of effort to develop a code; however, if possible, I would love to use LyZ in the future with some updated versions of Zotero as well. I am still struggling to understand why @wshanks recommends using better-bibtex while LyZ provides a more convenient and easy way.

wshanks commented 3 months ago

@mukesh4iitb If LyZ works for you now that is great. The issue is that it does not work with Zotero 7 and I don't have time to update it. If someone else is able to update it, I will accept contributions and make a new release through the standard update channel but for now I would not count on LyZ working with new versions of Zotero.