Skip to content
This repository was archived by the owner on Feb 6, 2025. It is now read-only.

A bit of cleanup / infrastructure 2#2

Merged
lpaioro merged 8 commits into
lpaioro:sampfrom
cdeil:sampy2
Apr 15, 2013
Merged

A bit of cleanup / infrastructure 2#2
lpaioro merged 8 commits into
lpaioro:sampfrom
cdeil:sampy2

Conversation

@cdeil

@cdeil cdeil commented Apr 13, 2013

Copy link
Copy Markdown
Collaborator

As discussed in #1
let's run autopep8 later to keep the diff readable.

@astrofrog

Copy link
Copy Markdown
Collaborator

@cdeil - line 4766, replace

  except IOError, (errno, strerror):
    print "[SAMP] Error: I/O error(%s): %s" % (errno, strerror)

by

  except IOError as e:
    print "[SAMP] Error: I/O error(%s): %s" % (e.errno, e.strerror)

what error do you get now for sampy?

@astrofrog

Copy link
Copy Markdown
Collaborator

I had issues getting Tk to work in MacPorts (it's a bug) but then used Anaconda and I get:

$ sampy
[SAMP] Info    (2013-04-13T12:06:40.848520): Hub set to run with Web Profile support enabled.
[SAMP] Info    (2013-04-13T12:06:42.171785): Hub started
Tcl_WaitForEvent: CFRunLoop finished
Abort trap

@lpaioro - have you seen this before?

@astrofrog

Copy link
Copy Markdown
Collaborator

With DEBUG info:

air-2:~ tom$ sampy -L DEBUG
[SAMP] Info    (2013-04-13T12:12:12.183282): Hub set to run with Web Profile support enabled.
[SAMP] Debug   (2013-04-13T12:12:13.226218): Running mode: single
[SAMP] Debug   (2013-04-13T12:12:13.226419): Lock-file: /Users/tom/.samp
[SAMP] Debug   (2013-04-13T12:12:13.227589): register: private-key = d5a64d3da8d6ec7ace16c31545869d2b and self-id = cli#hub
[SAMP] Debug   (2013-04-13T12:12:13.227677): declareMetadata: private-key = d5a64d3da8d6ec7ace16c31545869d2b metadata = {'author.email': 'luigi@iasf-milano.inaf.it', 'author.name': 'Luigi Paioro', 'author.affiliation': 'INAF-IASF Milano', 'samp.icon.url': 'http://127.0.0.1:54995/sampy/icon', 'samp.documentation.url': 'http://packages.python.org/sampy/', 'samp.description.text': 'Hub 45073-0', 'samp.name': 'Hub'}
[SAMP] Debug   (2013-04-13T12:12:13.227761): declareSubscriptions: private-key = d5a64d3da8d6ec7ace16c31545869d2b mtypes = {'x-samp.query.by-meta': {}, 'samp.app.ping': {}}
[SAMP] Debug   (2013-04-13T12:12:13.228075): declareSubscriptions: subscriptions accepted from d5a64d3da8d6ec7ace16c31545869d2b => {'x-samp.query.by-meta': {}, 'samp.app.ping': {}}
[SAMP] Info    (2013-04-13T12:12:13.570666): Hub started
Tcl_WaitForEvent: CFRunLoop finished
Abort trap

@cdeil

cdeil commented Apr 13, 2013

Copy link
Copy Markdown
Collaborator Author

@astrofrog I made the change in line 4766 you suggested.
For me starting sampy sometimes works and sometimes it doesn't (seems random):

$ sampy         
[SAMP] Info    (2013-04-13T16:08:39.447420): Hub set to run with Web Profile support enabled.
[SAMP] Error: I/O error(None): None
Exception AttributeError: "'SAMPHubServer' object has no attribute '_is_running'" in <bound method SAMPHubServer.__del__ of <astropy.vo.samp.core.SAMPHubServer object at 0x10c151a10>> ignored
$ sampy
[SAMP] Info    (2013-04-13T16:08:41.921549): Hub set to run with Web Profile support enabled.
[SAMP] Info    (2013-04-13T16:08:42.983773): Hub started
^C[SAMP] Info    (2013-04-13T16:08:47.017349): Hub is stopping...
[SAMP] Info    (2013-04-13T16:08:48.015079): Hub stopped.

I see the error about every second time ... you might have to give it a few tries to see the problem.

@astrofrog

Copy link
Copy Markdown
Collaborator

@cdeil - I think we'll have to defer to @lpaioro on that one (but could you push the first fix to this PR?)

@cdeil

cdeil commented Apr 13, 2013

Copy link
Copy Markdown
Collaborator Author

@astrofrog I added the fix you proposed to this PR.
@lpaioro Can you merge this PR into your samp branch?

@lpaioro lpaioro merged this pull request into lpaioro:samp Apr 15, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants