Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

PyPy3 Issue #7

Closed
Konloch opened this issue Aug 7, 2015 · 5 comments
Closed

PyPy3 Issue #7

Konloch opened this issue Aug 7, 2015 · 5 comments

Comments

@Konloch
Copy link

Konloch commented Aug 7, 2015

For some reason when using pypy3-2.4.0-win32 and BCV I get this exception:
Traceback (most recent call last):
File "C:\Users\null.Bytecode-Viewer\enjarify_2\enjarify-master\enjarify\main.py", line 75, in main
outfile = open(outname, mode=('wb' if args.force else 'xb'))
ValueError: invalid mode: xb

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "H:\Programs\pypy3-2.4.0-win32\lib-python\3\runpy.py", line 161, in _run_module_as_main
"main", fname, loader, pkg_name)
File "H:\Programs\pypy3-2.4.0-win32\lib-python\3\runpy.py", line 74, in _run_code
exec(code, run_globals)
File "C:\Users\null.Bytecode-Viewer\enjarify_2\enjarify-master\enjarify\main.py", line 94, in
main()
File "C:\Users\null.Bytecode-Viewer\enjarify_2\enjarify-master\enjarify\main.py", line 76, in main
except FileExistsError:
NameError: global name 'FileExistsError' is not defined

However with Python 3.4 it works fine, this is on Windows 7.

Is there maybe something I messed up on with BCV? If that's the case sorry for opening a ticket here, I just wasn't sure because Python 3.4 works perfectly fine, whereas PyPy3 doesn't.

@Storyyeller
Copy link
Contributor

The problem is that FileExistsError wasn't introduced until 3.3, while the stable version of Pypy3 is only 3.2 compatible. While testing, I used a version of Pypy built from source, which is 3.3 compatible, so I didn't notice it until release.

It's a known issue, but I'm not sure what the best approach to resolving it is.

@Storyyeller
Copy link
Contributor

See also the discussion in this pull request. #6

@Storyyeller
Copy link
Contributor

In the meantime, you can workaround it by always specifying -f.

@Konloch
Copy link
Author

Konloch commented Aug 8, 2015

Ah ok, thank's for the response!

@Storyyeller
Copy link
Contributor

I added an explicit error message when running under 3.2 without -f specified.

chubbymaggie pushed a commit to chubbymaggie/enjarify that referenced this issue Dec 5, 2019
Fix IR generation when Switch is replaced with GOTO.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants