Re: [mapserver-users] Create imageObject failed in python binding.

2013-08-19 Thread Umberto Nicoletti
Shawn,
I have briefly checked the python mapscript sources and I am afraid the you
might have hit a bug.
Python mapscript has a special, more pythonic imageObj constructor which
seems to depend heavily on GD code
and that possibily explains the error you are experiencing.

Would you mind opening an issue at:

https://github.com/mapserver/mapserver/issues/new

Please state the mapserver version and, if built from sources, the options
used.
It would greatly speed up the resolution process if you could build
mapserver/mapscript from the git sources.

BR,
Umberto


On Sun, Aug 18, 2013 at 4:59 AM, Shawn Gao gaoh...@gmail.com wrote:

 Hi, All,

 Official document on mapserver site said use following way to create an
 imageObject instance in python. look at this 
 linkhttp://mapserver.org/mapscript/mapscript.html#imageobj

 new imageObj( int width, int height [, 
 outputFormatObjhttp://mapserver.org/mapscript/mapscript.html#outputformatobj
  format=NULL
 [, string filename=NULL ] ] ) : imageObj

 So I create imageObject in Python by this,

 mapscript.imageObj(100,100,GD/PNG, '
 http://mapserver.org/_static/banner.png')

 But get error, Segmentation fault (core dumped).

 Then I check the test case of python binding. The test case for
 imageObject is in imagetest.py. I try it firstly. Then many cases failed,
 include the case for create imageObject instance. I found the create method
 in test script is in other way.

 def testConstructorUrlStream(self):
 imageObj with a URL stream works
 url = urllib.urlopen('http://mapserver.org/_static/banner.png')
 imgobj = mapscript.imageObj(url, 'GD/JPEG')
 assert imgobj.thisown == 1
 assert imgobj.height == 68
 assert imgobj.width == 439
 imgobj.save('testConstructorUrlStream.jpg')


 What's the correct way to create an imageObject from url or file?

 Thanks,
 Shawn

 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] ScribeUI: Possible segmentation fault on Ubuntu 12.04

2013-08-19 Thread Luís de Sousa
Hi Jessica, you'll find below the contents of the files you ask plus the
Apache config.

Here's an example of an address ScirbeUI is trying to access that doesn't
exist:

http://localhost/static/css/reset.css

I believe it should be:

http://localhost/ScribeUI/static/css/reset.css

But I can't see where this particular path could be configured.

Thanks for helping,

Luís


#--
# config.py

#Replace 0.0.0.0 with your server's ip or hostname
#Examples: 127.0.0.1, my.host.com
ip = 0.0.0.0


#--
# runserver.wsgi

from runserver.py import app as application

import sys

#Replace scribeui_path with the path to the root of your scribeui
installation
#Example: /opt/ScribeUI/application/runserver.py

sys.path.insert(0,'/opt/ScribeUI/application/runserver.py')

WSGIScriptAlias /ScribeUI /opt/ScribeUI/application/runserver.py


#--
# ScribeUI.conf

#ScribeUI

WSGIScriptAlias /ScribeUI /opt/ScribeUI/application/runserver.py
AddType text/html .py
Directory /opt/ScribeUI/application/templates
  Order deny,allow
  Allow from all
/Directory

Alias /ScribeUI/download/ /opt/ScribeUI/application/www/
Directory /opt/ScribeUI/application/www/
  AllowOverride None
  Options Indexes FollowSymLinks Multiviews
  Order allow,deny
  Allow from all
/Directory




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/ScribeUI-Possible-segmentation-fault-on-Ubuntu-12-04-tp5072423p5073155.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] ScribeUI: Possible segmentation fault on Ubuntu 12.04

2013-08-19 Thread Jessica Lapointe
Hi Luis,

You are right that the url should be localhost/ScribeUI/static.
In your config.py file, this ip = 0.0.0.0 should be the domain you
access the app with, in your case, it should be  ip = localhost
After changing this the easiest way to see your changes instantly will
be to restart apache, because otherwise mod_wsgi will not necessarily
acknowledge your changes immediately.
Thank you,
Jessica

On Mon, Aug 19, 2013 at 9:52 AM, Luís de Sousa
luis.a.de.so...@gmail.com wrote:
 Hi Jessica, you'll find below the contents of the files you ask plus the
 Apache config.

 Here's an example of an address ScirbeUI is trying to access that doesn't
 exist:

 http://localhost/static/css/reset.css

 I believe it should be:

 http://localhost/ScribeUI/static/css/reset.css

 But I can't see where this particular path could be configured.

 Thanks for helping,

 Luís


 #--
 # config.py

 #Replace 0.0.0.0 with your server's ip or hostname
 #Examples: 127.0.0.1, my.host.com
 ip = 0.0.0.0


 #--
 # runserver.wsgi

 from runserver.py import app as application

 import sys

 #Replace scribeui_path with the path to the root of your scribeui
 installation
 #Example: /opt/ScribeUI/application/runserver.py

 sys.path.insert(0,'/opt/ScribeUI/application/runserver.py')

 WSGIScriptAlias /ScribeUI /opt/ScribeUI/application/runserver.py


 #--
 # ScribeUI.conf

 #ScribeUI

 WSGIScriptAlias /ScribeUI /opt/ScribeUI/application/runserver.py
 AddType text/html .py
 Directory /opt/ScribeUI/application/templates
   Order deny,allow
   Allow from all
 /Directory

 Alias /ScribeUI/download/ /opt/ScribeUI/application/www/
 Directory /opt/ScribeUI/application/www/
   AllowOverride None
   Options Indexes FollowSymLinks Multiviews
   Order allow,deny
   Allow from all
 /Directory




 --
 View this message in context: 
 http://osgeo-org.1560.x6.nabble.com/ScribeUI-Possible-segmentation-fault-on-Ubuntu-12-04-tp5072423p5073155.html
 Sent from the Mapserver - User mailing list archive at Nabble.com.
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users