EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #09583


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] Error on BibTeX importer


Hi all,

I am not sure what version of EPrints you were previously running but there was a change to the BibTeX import/export plugin to better handle issues if TeX::Encode is not installed (pre 3.4.4 release).  See:

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints3.4%2Fissues%2F193&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7Cbb930fa82e2040c17aad08dc2188d648%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638422118785636697%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=4WmHzzmvrKA2EMw3g5TGq4PdaFNj879WeN5PrEIqNTE%3D&reserved=0

This relates to TeX::Encode no longer being able as an OS package (i.e. perl-TeX-Encode) in RHEL 9.  It seems that even if TeX::Encode is not installed for the import plugin this can still cause an issue as it is just the advertise that is not unset and it is not fully disabled.  I will have a further look at testing this on EL 9 (Rocky Linux 9) with TeX::Encode installed, which I have currently installed on my test server via CPAN.  So probably the best plan for now is to run:

cpan TeX::Encode

I normally do this as the root user, so it is available to all users.  However, in theory it only needs to be installed for the eprints user (depending on what the Apache/httpd user is set as).

EPrints used to package the TeX::Encode library in it core codebase but I felt this was a bad idea, as it would be liable to get out of date or need regularly updating before each release. If EL 9+ is going to stop packaging it, this may need to be reconsidered.  What are people's thoughts with need to use CPAN to install certain Perl modules required by the EPrints core codebase?  Is this better than packaging the libraries in the core codebase where they may get out of date?

Regards

David Newman

On 30/01/2024 11:29, Matthew Kerwin wrote:
CAUTION: This e-mail originated outside the University of Southampton.

CAUTION: This e-mail originated outside the University of Southampton.

Hi Alan,

On Tue, 30 Jan 2024 at 21:22, Alan.Stiles [He/Him/They]
<alan.stiles@open.ac.uk> wrote:
Looking at a new 3.4.5 install on RHEL 9 and the BibTeX importer is throwing an error at me for
Unhandled exception in Import::BibTeX: Unknown encoding 'bibtex' at /opt/eprints/flavours/pub_lib/plugins/EPrints/Plugin/Import/BibTeX.pm line 573, <$fh> line 10.

Which is  https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints3.4%2Fblob%2Fcd95f5c21af9dcdfcd2efa6df88a1fc35a20597c%2Fflavours%2Fpub_lib%2Fplugins%2FEPrints%2FPlugin%2FImport%2FBibTeX.pm%23L573&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7Cbb930fa82e2040c17aad08dc2188d648%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638422118785636697%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=9KVkVY44nBBu5dl7aZG6hs%2FIVoZEA%2FVXX4d6YSTt8Dc%3D&reserved=0

$epdata = decode('bibtex', $epdata);

and presumably is using the decode function in the Encode module.

Anybody else seen & solved this already?

Thanks,

Alan

My first instinct is to ensure you have TeX::Encode::BibTeX
<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmetacpan.org%2Fpod%2FTeX%3A%3AEncode%3A%3ABibTeX&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7Cbb930fa82e2040c17aad08dc2188d648%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638422118785792900%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=50mZ5eAAxnkbibsaiUGqO2spmII%2FONWwrzmOpFQzsJM%3D&reserved=0> installed and linked.

Cheers
--
   Matthew Kerwin
   https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmatthew.kerwin.net.au%2F&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7Cbb930fa82e2040c17aad08dc2188d648%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638422118785792900%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=%2B%2FPn7X2U1gDqhPjDBRPgWNNUWDq%2BWwwtzmcLavM%2BXEo%3D&reserved=0

*** Options: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FEprints-tech_Mailing_List&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7Cbb930fa82e2040c17aad08dc2188d648%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638422118785792900%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=z7pb1WmGTO3v1U%2BPU%2BJQyvePRFqzr7iDkFkoZfQKtJo%3D&reserved=0
*** Archive: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7Cbb930fa82e2040c17aad08dc2188d648%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638422118785792900%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=pFhBqWcv2vYFyG57Kv5Z3lRsGJIJAS8wiL0VGdCqYJo%3D&reserved=0
*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2F&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7Cbb930fa82e2040c17aad08dc2188d648%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638422118785792900%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=%2BM7xpfhQNQ%2Bd7imTqwezv5msGI5org4QAnu460kdz%2F4%3D&reserved=0