Hi all,
I am using the mlabwrap module in python for my thesis and I have encountered an error : some times when I call my matlab function from my python code it stops and shows this error " mlabrap.error: Subscript indices must be either real positive integers or logicals" and the line where this error occured:"l=mlab .tetris_learn(s umm[2:442])" The funny thing is that this error occurs sometimes after this line was executed with no problem before.In other words,when my main python code is executed for a number of iterations,this error occurs either in the second or third iteration.Any ideas,
Thanks in advance,
steve
7 4347 Glenton 391
Recognized Expert Contributor
Impossible to say without knowing more. Presumably summ[2:422] changes from being a real positive integer or logical to something else?
A handy debugging technique that I use is printing out the relevant variables separately in the line before the bug occurs. So in this case printing summ[2:422] just before the line you've giving.
Hi Glenton,thanks for answering.Here is the strangeness of this error,I already am printing summ[2:422] before the error occurs and it displays an array filled with numbers with no gaps or zeros.And the dimensions of this array are correct for my matlab script((1,440) is the dimension).Any ideas??
Steve
Glenton 391
Recognized Expert Contributor
Hard to say. Sounds like it might be a problem with running the matlab script twice? Fraid I really don't know...
A,ok,many thanks.I will google even more then.Bye,
steve
Hi all ,one question :has anyone encountered any indexing problems while using mlabwrap for calling matlab functions from within python??And particularly an error saying :"Subscript indices must be either real positive integers or logicals"
If anyone knows pleeeeeeeeease tell me so OK??
Thanks in advance,
steve
bvdet 2,851
Recognized Expert Moderator Specialist
One thing you could do to narrow the problem down - Encapsulate the block of code causing the problem in a try/except block as in - try:
-
...code...
-
except mlabrap.error, e:
-
print e
-
...print the values of current variables...
You could also use the debug tool that comes with many IDE's to step through the code.
A,ok thanks mate!I will give it a try...Also,I didn't mention that this error occurs after a random time,in other words I don't know when it will occur during my runs,it even doesn't occur at all sometimes .Was that a bit more helpful??Anyway s,thanks again,
Steve
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: AIM |
last post by:
Error in msvc in building inheritance.obj to build hello.pyd
Hello,
I am trying to build the boost 1.31.0 sample extension hello.cpp.
I can not compile the file inheritance.cpp because the two
files containing some templates: adjacency_list.hpp and mem_fn.hpp can
not compile.
Does anyone have any solutions?
|
by: Tony Wright |
last post by:
Hi,
I am having a problem installing an msi for a web site. The error
message I am getting is:
"The specified path 'http://mipdev05/features/Fas2' is unavailable.
The Internet Information Server might not be running or the path
exists and is redirected to another machine. Please check the status
of this virtual directory in the Internet...
|
by: Aravind |
last post by:
we have two files:
1. rc4.c (defines one function "create_pin()")
2. MyImpl.c(calling the function "create_pin()"),This implements JNI
method.
1.When I am trying to create .dll file with one file rc4.obj(rc4.c),it
is creating the .dll file without any error.
Command : ILINK32 rc4.obj
2.But,when we are trying to create .dll file with two...
|
by: deko |
last post by:
I use this convention frequently:
Exit_Here:
Exit Sub
HandleErr:
Select Case Err.Number
Case 3163
Resume Next
Case 3376
Resume Next
|
by: p |
last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also
have Crystal 9 pro on my development machine. The web app runs fine on my
dev machine but am having problems deploying. I created the websetup and
built the MSI, have the bundled version. Copied to webserver and ran
Websetup.msi. Said I had to remove old version,...
| |
by: f rom |
last post by:
----- Forwarded Message ----
From: Josiah Carlson <jcarlson@uci.edu>
To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org
Sent: Monday, December 4, 2006 10:03:28 PM
Subject: Re: 1>make_buildinfo.obj : error LNK2019: unresolved external symbol __imp__RegQueryValueExA@24 referenced in function _make_buildinfo2
Ask on...
|
by: hyperpau |
last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding.
I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com).
Ergo, I will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge.
I would be using layman's...
|
by: hyperpau |
last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding.
I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com).
Ergo, I will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge.
I would be using layman's...
|
by: yashu0209 |
last post by:
I have an error occurring when i try to compile the program and the error is:
D:\Program Files\visual studio 6.0\MSDev98\MyProjects\GLEnabledView\GLNew.cpp(164) : error C2653: 'CGLEnabledView' : is not a class or namespace name
D:\Program Files\visual studio 6.0\MSDev98\MyProjects\GLEnabledView\GLNew.cpp(164) : error C2061: syntax error :...
|
by: sarah2855 |
last post by:
Hello everyone,
I'm running a Make-Table Query in Access. They was working fine up intill an hour ago and suddenly now that I'm running the query , I keep getting this error message:
Can not open Database 'Query 1'. This may not be a database that your application recognizes, or the file maybe corrupted.
And if I close access and...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |