Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7748329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:45:23+00:00 2026-06-01T10:45:23+00:00

ScriptEngine PythonEngine = Python.CreateEngine(); Scope = PythonEngine.CreateScope(); Point P = new Point(-1,1); Scope.SetVariable(QWE, P);

  • 0
        ScriptEngine PythonEngine = Python.CreateEngine();            
        Scope = PythonEngine.CreateScope();

        Point P = new Point(-1,1);
        Scope.SetVariable("QWE", P);

        PythonEngine.Execute("QWE.X = 0");

        Console.WriteLine(P);

“UnboundNameException was Unhandled”

“global name ‘QWE’ is not defined”

I have no idea what this exception means, nor how to solve it, and I believe I’m doing something pretty simple… right?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T10:45:25+00:00Added an answer on June 1, 2026 at 10:45 am

    Your engine is not tied to the scope. Change following line:

    PythonEngine.Execute("QWE.X = 0", scope);
    

    The error means that the variable “QWE” is not declared in code. It was due to the fact that engine wasn’t executing in the defined scope (where QWE was declared).

    I’d recommend reading this link to get started with IronPython. They’ve got code examples and some explanations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider the code below: ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(null); ScriptRuntime runtime = new ScriptRuntime(setup); ScriptEngine
I have the following: ScriptEngineManager mgr = new ScriptEngineManager(); ScriptEngine jsEngine = mgr.getEngineByName(JavaScript); jsEngine.eval(function
I'm currently doing the following to create and execute a simple python calculation, using
private ScriptEngine pe; private ScriptScope scope; private void button1_Click(object sender, EventArgs e) { pe
@Test public void testB() throws ScriptException, NoSuchMethodException { ScriptEngineManager manager = new ScriptEngineManager(); ScriptEngine
A code is worth 1000 words of explaining it :-) package jasim; import javax.script.ScriptEngine;
I am receiving this error when trying to execute applescript from my java application.
I just started to use the Java ScriptEngine to do little extensions to my
Is it possible to reference the javax.script.ScriptEngine library when developing an android application? If
To embed some IronPython Code into C# I want to use the ScriptEngine using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.