runtime-error

R Error: names() applied to a non-vector

家住魔仙堡 提交于 2019-12-05 09:51:36
问题 I have a chunk of code which produces an error only the first time I run it. Strangely if I run it a second time I get no error (craziness definition?). Also the error does not show up always at the same position, I mean that if I add a few lines of comments the error message is printed after the comments and not after a specific instruction. I cannot provide a reproducible example because I do not know where exactly the error comes from. The error is the following: Error in names(frame)

What is the meaning of this C++ Error std::length_error

删除回忆录丶 提交于 2019-12-05 09:45:50
问题 While running my program I get this error: terminate called after throwing an instance of 'std::length_error' what(): basic_string::_S_create Abort trap I know that you can't do much without the code but I think that this error is too deep in the code to copy all of it. Maybe I can figure it out if I understand what this error means. Is this a sign for an issue with reading or writing at the wrong memory address? Is there something I can do to get more information about the problem from my

Angular 2 RC 4 “(SystemJS) Can't resolve all parameters for [object Location]: ” in IE 11

不打扰是莪最后的温柔 提交于 2019-12-05 08:14:36
My Web App works fine in Chrome, Firefox and Edge, but of course not in IE 11. Probably not older versions of IE as well. It is a minimal app using Angular Cli to generate the app. full error: EXCEPTION: Can't resolve all parameters for [object Location]: (?). EXCEPTION: Can't resolve all parameters for [object Location]: (?). Unhandled Promise rejection: (SystemJS) Can't resolve all parameters for [object Location]: (?). Evaluating http://localhost:4200/main.js Error loading http://localhost:4200/main.js ; Zone: <root> ; Task: Promise.then ; Value: Error: (SystemJS) Can't resolve all

Why no runtime error when clearly writing over array bounds?

∥☆過路亽.° 提交于 2019-12-05 07:52:23
I have a program that assigns an array beyond it's bounds, and I was expecting a run-time error to be thrown. Yet no error is raised at all and the program proceeds to write into undeclared memory. Is there some compiler option to guard against this? With the memory dump shown it is clear this overreach of bounds is real. Is there a way to declare variables or argument specs to catch this? Obviously this is a clear case, but when tasked to maintain thousands of lines of F77 derived code it is not always clear (to me) if this might be happening. PROGRAM TEST_CODE IMPLICIT NONE INTEGER*4 :: R(5)

Python Terminated Thread Cannot Restart

家住魔仙堡 提交于 2019-12-05 05:57:27
I have a thread that gets executed when some action occurs. Given the logic of the program, the thread cannot possibly be started while another instance of it is still running. Yet when I call it a second time, I get a "RuntimeError: thread already started" error. I added a check to see if it is actually alive using the Thread.is_alive() function, and it is actually dead. What am I doing wrong? I can provide more details as are needed. Threads cannot be restarted. You must re-create the Thread in order to start it again. GHHT From the Python documentation: start() starts the thread's activity.

Python rpy2 and quantmod examples

孤者浪人 提交于 2019-12-05 05:01:59
问题 Python programming language has helped me a lot in developing financial data analysis applications. Alternatively, there is the R for data analysis too, which has dedicated financial data analysis packages, for example: quantmod. Now, that there is rpy2 to interface between both these languages(i.e. Python & R). I would like to prototype some financial data analysis applications using the power of python with the quantmod package. By now, I have spent several hours searching the internet for

RuntimeWarning: invalid value encountered in maximum

左心房为你撑大大i 提交于 2019-12-05 03:05:17
Weird behavior (bug??) in numpy. Contrary to the docs, the following code gives a RuntimeWarning: invalid value encountered in fmax a = np.random.uniform(0.1, 0.4, (5, 5)) b = np.random.uniform(0, 3.5, (5, 5)) b[0, 0] = np.nan c = np.fmax(a, b) # Same problem with c = np.maximum(a, b) I'm stuck as I need these NaNs in my arrays and now my functions stop in iPython with this damn warning (ok, they really don't stop but it's rather annoying) EDIT : numpy 1.6.1 ipython 0.13.1 I get the same issue as well. These warnings are an intentional aspect of numpy, to inform users when they may be running

Why does Rust check array bounds at runtime, when (most) other checks occur at compile time?

情到浓时终转凉″ 提交于 2019-12-05 02:47:49
Reading the basic introduction : If you try to use a subscript that is not in the array, you will get an error: array access is bounds-checked at run-time. Why does Rust check array bounds at runtime, when it seems most other checks occur at compile time? Because checking indices at compile time is not feasible in the general case. Reasoning about the possible values of arbitrary variables is somewhere between hard and impossible even for small programs. Nobody wants to have to: formally prove that the index can't be out of bounds, and encode that proof into the type system ... for every

Pure Virtual Function call from Base Ctor

孤街醉人 提交于 2019-12-05 01:45:23
问题 Consider the following sample code: #include <iostream> using namespace std; class base { public: base() { bar(); //Line1 this->bar(); //Line2 base *bptr = this; bptr->bar(); //Line3 ((base*)(this))->bar(); //Line4 } virtual void bar() = 0; }; class derived: base { public: void bar() { cout << "vfunc in derived class\n"; } }; int main() { derived d; } The above code has pure virtual function bar() in base class which is overriden in the derived class. The pure virtual function bar() has no

Why can't i see a detailed error message in this aspx page?

落爺英雄遲暮 提交于 2019-12-05 01:33:51
I have a aspx page and it displays custom error but i can't see a detailed error message. My web.config looks like this, <?xml version="1.0"?> <configuration> <appSettings /> <connectionStrings /> <system.web> <compilation debug="true" /> <authentication mode="Windows" /> <customErrors mode="On" /> </system.web> </configuration> To see the error you need customErrors off , like this: <customErrors mode="Off"></customErrors> From the docs , here are the options for the mode attribute: On - Specifies that custom errors are enabled. If no defaultRedirect attribute is specified, users see a