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

@pyexec broken: ERROR: LoadError: UndefVarError: MacroTools not defined #479

Closed
lassepe opened this issue Mar 18, 2024 · 1 comment · Fixed by #480
Closed

@pyexec broken: ERROR: LoadError: UndefVarError: MacroTools not defined #479

lassepe opened this issue Mar 18, 2024 · 1 comment · Fixed by #480
Labels
bug Something isn't working

Comments

@lassepe
Copy link
Contributor

lassepe commented Mar 18, 2024

Affects: PythonCall

Describe the bug

The following code used to work but is broken on the latest release and current master:

(@v1.10) pkg> activate --temp

julia> using PythonCall

julia> PythonCall.@pyexec (err = "asdf") => `raise err`
ERROR: LoadError: UndefVarError: `MacroTools` not defined
Stacktrace:
 [1] macro expansion
   @ ~/.julia/packages/MacroTools/Cf2ok/src/match/macro.jl:67 [inlined]
 [2] _pyeval_macro_args(arg::Expr, filename::String, mode::String)
   @ PythonCall.Core ~/.julia/packages/PythonCall/vW5OI/src/Core/builtins.jl:1273
 [3] var"@pyexec"(__source__::LineNumberNode, __module__::Module, arg::Any)
   @ PythonCall.Core ~/.julia/packages/PythonCall/vW5OI/src/Core/builtins.jl:1346
in expression starting at REPL[3]:1

System

julia> versioninfo()
Julia Version 1.10.2
Commit bd47eca2c8a (2024-03-01 10:14 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × AMD Ryzen 9 5900HX with Radeon Graphics
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
Threads: 16 default, 0 interactive, 8 GC (on 16 virtual cores)
Environment:
  JULIA_NUM_THREADS = auto
  JULIA_LSP_JULIA_BIN = /home/lassepe/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/bin/julia
  JULIA_SYSIMAGE_LIB_DIR = /home/lassepe/worktree/SystemImagePrecompile.jl/builds
@lassepe lassepe added the bug Something isn't working label Mar 18, 2024
lassepe added a commit to lassepe/PythonCall.jl that referenced this issue Mar 18, 2024
@lassepe
Copy link
Contributor Author

lassepe commented Mar 18, 2024

I guess this is just
FluxML/MacroTools.jl#30

cjdoris pushed a commit that referenced this issue Mar 18, 2024
* Hot fix for #479

* Add regression test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant