Re: [Veusz-discuss] Import plugin crash at startup

2013-05-31 Par sujet Jeremy Sanders

On 05/31/2013 04:16 PM, Jason Zink wrote:


Is there some way to manually remove a plugin from the list?  If so, where
can I find the appropriate files to do so?


Dear Jason

You can delete the Veusz preferences (detailed here):
 http://www.barmag.net/veusz-wiki/PreferencesFile

You can edit the file (or registry) to remove the bad plugin, or delete 
it altogether.


I need to add some code to catch errors in plugin initialisation so that 
the application can start.


Jeremy


___
Veusz-discuss mailing list
Veusz-discuss@gna.org
https://mail.gna.org/listinfo/veusz-discuss


Re: [Veusz-discuss] Import plugin crash at startup

2013-05-31 Par sujet Jeremy Sanders

On 31/05/13 19:36, Zink Jason (DGS-EC/PJ-GMP) wrote:


Perhaps you could briefly give some pointers on the origin of the crashing 
plugin.  When I tried to load the plugin I followed the directions that were 
provided with it, to copy its Python file mdfreader.py to the Veusz directory.  
I then added the plugin to my preferences as described on the wiki.

The software attempts to load the plugin, but then fails saying that it doesn't 
have access to the 'multiprocessing' module.  I read on some of your other 
posts that Veusz has its own version of Python bundled in with it.  Does this 
mean that the built-in version of Python doesn't include 'multiprocessing'?


Veusz doesn't include the multiprocessing module in its version of 
Python, so that's probably the problem.


You might be able to copy the multiprocessing module from the standard 
distribution of python and put it in the same directory as your plugin.


Alternatively, you can edit the plugin to add the location of the 
multiprocessing module, e.g.


import sys
sys.path.append('/some/location...')

Jeremy



___
Veusz-discuss mailing list
Veusz-discuss@gna.org
https://mail.gna.org/listinfo/veusz-discuss


Re: [Veusz-discuss] Import plugin crash at startup

2013-05-31 Par sujet Jason Zink
Jeremy Sanders jeremy@... writes:

 
 On 31/05/13 19:36, Zink Jason (DGS-EC/PJ-GMP) wrote:
 
  Perhaps you could briefly give some pointers on the origin of the
crashing plugin.  When I tried to load the
 plugin I followed the directions that were provided with it, to copy its
Python file mdfreader.py to the
 Veusz directory.  I then added the plugin to my preferences as described
on the wiki.
 
  The software attempts to load the plugin, but then fails saying that it
doesn't have access to the
 'multiprocessing' module.  I read on some of your other posts that Veusz
has its own version of Python
 bundled in with it.  Does this mean that the built-in version of Python
doesn't include 'multiprocessing'?
 
 Veusz doesn't include the multiprocessing module in its version of 
 Python, so that's probably the problem.
 
 You might be able to copy the multiprocessing module from the standard 
 distribution of python and put it in the same directory as your plugin.
 
 Alternatively, you can edit the plugin to add the location of the 
 multiprocessing module, e.g.
 
 import sys
 sys.path.append('/some/location...')
 
 Jeremy
 

That get's me a bit further (adding the local installation directory to the
path) but there is still some errors.  The application is able to find and
load the multiprocessing module, but one of the python scripts within that
module (util.py) is trying to 'from subprocess import
_args_from_interpreter_flags', and it can't find that name in the subprocess
module.

This seems to me that portions of the python modules are being loaded from
within Veusz and the ones that aren't already packed in are loaded from the
external reference.  Perhaps they are each referencing different versions of
the subprocess module?  I apologize for the questions - I'm not very
experienced with Python...

Has anyone successfully used this plugin before?  The link is here:
http://code.google.com/p/mdfreader/.  Even if someone can just confirm that
it loads properly in their installation then it would be a big help to my
debugging activities.

Thanks again for your help.



___
Veusz-discuss mailing list
Veusz-discuss@gna.org
https://mail.gna.org/listinfo/veusz-discuss


Re: [Veusz-discuss] Import plugin crash at startup

2013-05-31 Par sujet Gmail

Dear Jason,

I am the writer of this plugin mdfreader.
I indeed had this concern with previous Veusz versions..
Please download the latest mdfreader dataplugin version, it should be 
working.


Aymeric

Le 31/05/13 16:16, Jason Zink a écrit :

Hello,

I am trying to use a plugin to read MDF files (from here:
http://code.google.com/p/mdfreader/), but the plugin appears to be crashing
for some reason.  Since the import plugin was added to the list of plugins
to load (via the preferences dialog) the whole Veusz application shuts down
immediately after startup.

I tried to uninstall Veusz and reinstall it, but it always remembers that
plugin and tries to load it at startup.  This effectively disables the tool
completely!

Is there some way to manually remove a plugin from the list?  If so, where
can I find the appropriate files to do so?

Thanks in advance for your help!

- Jason Zink


___
Veusz-discuss mailing list
Veusz-discuss@gna.org
https://mail.gna.org/listinfo/veusz-discuss



___
Veusz-discuss mailing list
Veusz-discuss@gna.org
https://mail.gna.org/listinfo/veusz-discuss


Re: [Veusz-discuss] Import plugin - importing datetime data

2011-09-07 Par sujet mimisa...@gmail.com

Hi Jeremy,
I wrote a tool plugin as you suggested, and it worked. But in my opinion 
my code is not very efficient, because the tool plugin calls the import 
plugin and then reopens the data file in order read the constants... but 
it works!


I tried also to return a constant from the import plugin (using the 
development version in the repository) but probably something was wrong 
in my code, because I got an error.

My code for the import plugin is:
   def doImport(self, params):
#bla bla bla
return [ImportConstant(constName,10)]
And the traceback is:
Traceback (most recent call last):

  File D:\Valerio
   Mussi\Documents\Python\veusz\dialogs\importdialog.py, line 950, in
   slotImport
prefix, suffix)
  File D:\Valerio
   Mussi\Documents\Python\veusz\dialogs\importdialog.py, line 745, in
   doImport
results = doc.applyOperation(op)
  File D:\Valerio Mussi\Documents\Python\veusz\document\doc.py,
   line 162, in applyOperation
retn = operation.do(self)
  File D:\Valerio
   Mussi\Documents\Python\veusz\document\operations.py, line 1287, in do
ds.linked = linked
   UnboundLocalError: local variable 'ds' referenced before assignment

Doing my trials I noticed two things:
1.
In the on-line manual the documentation for AddCustom says: 
AddCustom(name, type, value) but I think It should be AddCustom(type, 
name, value)

2.
I was a bit silly, but writing my importplugin I used a string with a 
whitespace (Split Datasets) as the name of an ImportFieldCheck. The 
plugin worked well, but when I saved the document containing the 
imported data, and tried to reopen it I got an error, because of this 
line of document:
ImportFilePlugin(u'MUSP furnace import plugin', 
u'2011-05-10_Spezzone 04.txt', linked=True, encoding='latin_1', 
name=u'name', split Datasets=False)
The problem is that my Split Dataset is not a valid variable name, it 
is not a bug. In my opinion it could be useful to add a note in the 
documentation of the importfields explaining that the string name has 
to be a valid variable name.


Thanks,
Valerio Mussi.

On 06/09/2011 10:22, Jeremy Sanders wrote:

mimisa...@gmail.com wrote:


Hi Jeremy,
I used the workaround you suggested and it works fine.
Another little question: in the header of my data file I have some rows,
useful for plotting and manipulating data, stored in the form:
SampleFrequency = xxxyyyHy
I'd like to use them in order to crate Vuesz constants. Is there a way
to create constants programmatically in an importPlugin?


I've added some code which mostly works for returning constants from an
import plugin as extra dataset-like objects. It's in the development
version:

https://github.com/jeremysanders/veusz/commit/4b9905c4c696f507556a0541a2bba77f4fa34fa6

At the moment you could write a tools plugin which does the import and then
calls AddCustom to add your variables.

There is an issue with that API I notice, however. Adding multiple
definitions with the same name leaves the originals intact, though the later
ones override the earlier ones. I ought to fix that...

Jeremy



___
Veusz-discuss mailing list
Veusz-discuss@gna.org
https://mail.gna.org/listinfo/veusz-discuss

___
Veusz-discuss mailing list
Veusz-discuss@gna.org
https://mail.gna.org/listinfo/veusz-discuss


Re: [Veusz-discuss] Import plugin - importing datetime data

2011-09-05 Par sujet Jeremy Sanders
mimisa...@gmail.com wrote:

 Hi Jeremy,
 I used the workaround you suggested and it works fine.
 Another little question: in the header of my data file I have some rows,
 useful for plotting and manipulating data, stored in the form:
 SampleFrequency = xxxyyyHy
 I'd like to use them in order to crate Vuesz constants. Is there a way
 to create constants programmatically in an importPlugin?

Unfortunately I can't see a way to do that with the current API. You'd need 
to get access to the document object, which isn't exposed. It's definitely a 
useful thing to add however. Maybe the import function could also return 
some sort of ImportConstant objects with the datasets... I'll have a look.

Jeremy





___
Veusz-discuss mailing list
Veusz-discuss@gna.org
https://mail.gna.org/listinfo/veusz-discuss


Re: [Veusz-discuss] Import plugin - importing datetime data

2011-09-04 Par sujet Jeremy Sanders
mimisa...@gmail.com wrote:

 Hi all!
 First of all, thank you very much for VUESZ, it is really simple and
 effective. Since I discovered it I'm using it everyday.
 
 I'm trying to write an importPlugin to read the log files of a process
 control system I use at work. The problem is that the first column of data
 is a time-stamp in iso data format (-MM-DDThh:mm:ss.ss), but in the
 Import plugins page I cannot find a class able to import DateTime
 datasets (ImportDatasetDateTime ???).

I've missed out date time datasets for import and dataset plugins. It won't 
be hard to fix this and they should be there.

As a workaround, you can convert your datetime objects to veusz floating 
point times using

import veusz.utils as utils

utils.datetimetoFloat - convert python datetime to float
utils.dateStringToDate - convert string containing iso or local dates to 
floats

Then you can create a simple 1D dataset from these values. They won't show 
up correctly in the data edit dialog boxes, but they will plot.

This isn't a standard api, however, and might be subject to change.

Jeremy



___
Veusz-discuss mailing list
Veusz-discuss@gna.org
https://mail.gna.org/listinfo/veusz-discuss


Re: [Veusz-discuss] Import plugin

2010-11-25 Par sujet Jeremy Sanders
aymeric rateau wrote:

 3. I have an other question for you, sorry... The data I want to import
 are timeseries. It means for each data channels, I have a time channel
 related. The way mdf is made allows several data groups corresponding to
 one time channel (in total several time channels for several data groups).
 From my trials, the dataset2D is not corresponding to these data, the
 dataset1D either. Do you think I should implement a new data class to be
 managed by Veusz specifically for timeseries ?

I'd simply import the time channel as t and each data series as d_1, d_2, 
d_3... You can use the clone widget plugin to add plots for each t and d_x 
data set.

Jeremy



___
Veusz-discuss mailing list
Veusz-discuss@gna.org
https://mail.gna.org/listinfo/veusz-discuss


Re: [Veusz-discuss] Import plugin

2010-11-21 Par sujet aymeric rateau
Dear Jeremy,

Thank you very much for answering.
1. Your proposal for adding a field in parameters of importplugin seems
good.
I would imagine simply a field called number of header lines.
It would take the first line/column for the data names and skip the rest of
the lines/columns in header and start reading data just after header.
I can also send a sample of the dataset I usually use if you want. To say
honestly, this kind of data is quite common format in engineering field as
it fits easily with excel.
2. Thank you, I will try. I saw in previous discussions an other person had
same problem. Launching Veusz from source is working, so I will try what
you've written with compiled version.
3. I have an other question for you, sorry... The data I want to import are
timeseries. It means for each data channels, I have a time channel related.
The way mdf is made allows several data groups corresponding to one time
channel (in total several time channels for several data groups). From my
trials, the dataset2D is not corresponding to these data, the dataset1D
either. Do you think I should implement a new data class to be managed by
Veusz specifically for timeseries ?

Aymeric

2010/11/20 Jeremy Sanders jer...@jeremysanders.net

 aymeric rateau wrote:

  1. I was not able to load csv file with more than 1 line of comment. I
  would say that most generally generated files from data acquisition
  equipment (like engine bench) contain at least 2 header lines, One for
 the
  channel name and the second for the units. I could not find a field in
 the
  import interface to allow csv import with more than 1 line header. Would
  it be possible to arrange this ? Ultimatively, it would be interesting to
  consider the unit in the code to be displayed with the channel name.

 It's difficult to think of a way of specifying the data format of any type
 of CSV files. If anyone has a suggestion for how this might be done please
 tell me!

 I could add an option to only have one set of data in a column/row and to
 ignore any further text in that column.

  2. We use heavily the system INCA from ETAS company, generating MDF files
  (binary structure file a bit like netcdf or hdf5). I developed a module
  you could find source at following address :
  http://code.google.com/p/mdfreader/source/browse/
  So, I am now writing a plugin for Veusz to be able to visualize/analyse
  recorded data.
  I want to use Veusz in windows (compiled version) but I can not use my
  plugin attached (located in plugin directory with dedicated mdf plugin).
  Inside the plugin, I do a import to my mdf reader module, but during
 veusz
  launch, this module is not found. Would you know why and how to fix this
 ?

 As the compiled versions has its own copy of python, any modules which are
 installed in your local python aren't seen as it doesn't know about your
 local python directory.

 You can try setting the PYTHONPATH environment variable to contain the
 directory of your module. This should work as long as Veusz contains its
 dependencies.

 Jeremy



 ___
 Veusz-discuss mailing list
 Veusz-discuss@gna.org
 https://mail.gna.org/listinfo/veusz-discuss

___
Veusz-discuss mailing list
Veusz-discuss@gna.org
https://mail.gna.org/listinfo/veusz-discuss