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

import_name issue after switching to 3.8 #118

Open
arunpersaud opened this issue Mar 20, 2020 · 2 comments
Open

import_name issue after switching to 3.8 #118

arunpersaud opened this issue Mar 20, 2020 · 2 comments

Comments

@arunpersaud
Copy link

Hi

after switching to 3.8 I'm gettting the following error for a news feed where I set up a post process hook.

Traceback (most recent call last):
File "/usr/bin/r2e", line 5, in
rss2email.main.run()
File "/usr/lib/python3.8/site-packages/rss2email/main.py", line 171, in run
args.func(feeds=feeds, args=args)
File "/usr/lib/python3.8/site-packages/rss2email/command.py", line 92, in run
feeds.save()
File "/usr/lib/python3.8/site-packages/rss2email/feeds.py", line 348, in save
feed.save_to_config()
File "/usr/lib/python3.8/site-packages/rss2email/feed.py", line 261, in save_to_config
value = self._get_configured_option_value(
File "/usr/lib/python3.8/site-packages/rss2email/feed.py", line 308, in _get_configured_option_value
return _util.import_name(value)
File "/usr/lib/python3.8/site-packages/rss2email/util.py", line 114, in import_name
raise ValueError(obj)
ValueError: <function news_hook at 0x7f7846e2dee0>

The hook I want to call is in a file called myhook.py called news_hook.

I added a print statement in util.py:import_name and get the following:

PROTO 4 0
FRAME 24 2
SHORT_BINUNICODE myhook 11
MEMOIZE None 19
SHORT_BINUNICODE news_hook 20
MEMOIZE None 31
STACK_GLOBAL None 32
MEMOIZE None 33
STOP None 34

Seems it never gets a 'GLOBAL' opcode which the function is looking for... I don't understand opcodes enough to know what's going on here though.

Arun

@arunpersaud
Copy link
Author

Seems to be related to change in opcodes for pickle version 3 vs 4.

https://www.python.org/dev/peps/pep-3154/

@Ekleog
Copy link

Ekleog commented Sep 11, 2020

Hello,

This repository has been deprecated for a few years now, and has been replaced by https://github.com/rss2email/rss2email .

If this issue is still relevant to you, and not fixed with v3.12.2, could you please reopen the issue there?

Cheers,
Leo

tomjorquera pushed a commit to tomjorquera/rss2email that referenced this issue Dec 4, 2020
Add GitHub action to build and run tests on Ubuntu, Windows and macOS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants