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

  • SEARCH
  • Home
  • 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 3660820
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:14:35+00:00 2026-05-19T01:14:35+00:00

I refactored some code, and now I get this error when calling a function.

  • 0

I refactored some code, and now I get this error when calling a function. But everything seems to be fine, I even compared failing_argument.GetType().AssemblyQualifiedName between the old and the new code and they are the same. Any ideas what could be wrong?

The invocation of the function is in IronPython code, the function is in C# code (an assembly which didn’t change during this refactoring).

What sort of thing could generate this error?

EDIT: full IronPython traceback:

Traceback (most recent call last):
  File "D:\Work\Framework\python\ide\tab_manager.py", line 57, in add_chart_tab
    chart_tab = ChartTab(self.__main_window, self, tab_item, name, chart_descriptor)
  File "D:\Work\Framework\python\ide\chart_tab.py", line 64, in __init__
    self.__chart = Chart(self, self.__gui_cfg, self.__base_cfg, self.__chart_descriptor, self.__scroll_bar)
  File "D:\Work\Framework\python\ide\chart.py", line 57, in __init__
    self.update_topology(empty=False)
  File "D:\Work\Framework\python\ide\chart.py", line 93, in update_topology
    self.update_config()
  File "D:\Work\Framework\python\ide\chart.py", line 111, in update_config
    self.__global.chart_view = ChartView(self.__global)
  File "D:\Work\Framework\python\ide\chart_view.py", line 33, in __init__
    self.__spans = SpanUtil.compute_spans(time_series, gap_threshold)
TypeError: expected List[DataPoint], got List[DataPoint]
  • 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-05-19T01:14:35+00:00Added an answer on May 19, 2026 at 1:14 am

    After further debugging I managed to get a different error message from the code: Unable to cast object of type 'List[DataPoint]' to 'List[DataPoint]'

    Searching for this yielded a couple of articles explaining the problem:
    http://www.infinitec.de/post/2008/05/InvalidCastException-Unable-to-cast-object-of-Type-X-to-X.aspx
    http://geekswithblogs.net/rupreet/archive/2010/02/16/137988.aspx

    It turns out that the assembly containing DataPoint (from List[DataPoint]) it’s loaded twice in my application from two different locations. The cause in my case is that when Visual Studio builds an assembly, it also copies all the other referenced assemblies next to the newly built one in the bin folder. But I also dynamically load one of the referenced assemblies from it’s original build location.

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

Sidebar

Related Questions

I recently refactored some code and now have a static utility class with a
I recently refactored some ajax code to make it asynchronous. It was working perfectly
I am currently maintaining some code, which is likely to be refactored soon. Before
For some time now I've been structuring my code around methods with no side-effects
I have a very bad feeling about using lock in my code but now
I'm refactoring some code. Right now there are quite a few places with functions
In the designer I get this error: Error Creating Control: Object Reference Not Set
I have just refactored a colleague's code that, roughly, looked like this... public class
I have a problem with some code I need to refactor. Right now it
I experienced on when refactoring some code, maybe I'm blind but I failed to

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.