Giter Club home page Giter Club logo

Comments (9)

lofidevops avatar lofidevops commented on May 22, 2024

Actually it still happens (occasionally) when I subsequently load the Mailpile grain.

from sandstorm.

lofidevops avatar lofidevops commented on May 22, 2024

This is probably the cause of the following error that occurs when I click on the Mailpile cog...

Template error

Traceback (most recent call last):
  File "/mailpile/ui.py", line 418, in render_web
    return template.render(alldata)
  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 969, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 742, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/static/default/html/settings/index.html", line 30, in top-level template code
    <option {% if route.port == 465 %}selected {% endif %}value="465">465 (TLS)</option>
  File "/static/default/html/layouts/full.html", line 33, in top-level template code
    {% block content %}{{results}}{% endblock %}
  File "/static/default/html/settings/index.html", line 40, in block "content"
    This grain's email address is {{ result.profiles[1].email }}. If you want to continue using your current email, then you should <a href="https://support.google.com/mail/answer/10957?hl=en">set up forwarding</a>. Emails sent from this grain will appear to be from {{ result.profiles[0].email }} by default.
  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 397, in getattr
    return getattr(obj, attribute)
UndefinedError: mailpile.config.Checker object has no element 1

settings/index.html

from sandstorm.

jparyani avatar jparyani commented on May 22, 2024

This is actually two separate issues.

  • The first is that the mailpile port has a transient bug on startup. As you found, a refresh will fix it most of the time. I haven't been able to track it down, but it does seem to occur more often when creating grains.
  • The 2nd problem is a weird one. I'm having problems reproducing on my end, but I think I've managed to fix it. Can you download and manually install an updated spk from https://docs.google.com/file/d/0BzLCOahiEfRWaTc2VVA5blZheVk (use the "Upload an App" button). Please let me know if this fixes your issue.

from sandstorm.

lofidevops avatar lofidevops commented on May 22, 2024

Unfortunately the upload failed with "Failed to install app!"

Relevant-looking logs... can you confirm what the hashsum of the SPK should be? Thanks!

Unpacking app: /var/sandstorm/downloads/907006c62643ea8f5f56d767b4abc6b3.verified
xz: (stdin): Unexpected end of input
*** Uncaught exception ***
src/sandstorm/spk.c++:457: bug in code: child process failed; exitCode = 1
stack: 0x4e28bd 0x4e5e64 0x4069bd 0x4066dc 0x403ff4 0x40db46 0x40d55d 0x4edeff 0x4ef50d 0x4ef7f6 0x4e2f16 0x4e831d 0x4024c8 0x536aa0 0x4011a7
Failed to install app: Error: Unpack failed.
    at AppInstaller.<anonymous> (app/server/installer.js:314:13)
    at ChildProcess.<anonymous> (app/server/installer.js:152:21)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:753:16)
    at Process.ChildProcess._handle.onexit (child_process.js:820:5)

from sandstorm.

jparyani avatar jparyani commented on May 22, 2024

Sorry about that, it somehow got corrupted when I uploaded. A tested working version is up at https://docs.google.com/file/d/0BzLCOahiEfRWVjNjLW9sbkptZFE/edit. md5sum=dc5fe51f0809c258db810d4e10584644

from sandstorm.

lofidevops avatar lofidevops commented on May 22, 2024

The upgrade process completed successfully (included a prompt to replace files) but I seem to be getting the same error when I click on the Mailpile cog. This occurs on the existing grain and a fresh grain. I included the long datadict this time in case that helps:

Template error

Traceback (most recent call last):
  File "/mailpile/ui.py", line 418, in render_web
    return template.render(alldata)
  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 969, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 742, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/static/default/html/settings/index.html", line 30, in top-level template code
    <option {% if route.port == 465 %}selected {% endif %}value="465">465 (TLS)</option>
  File "/static/default/html/layouts/full.html", line 33, in top-level template code
    {% block content %}{{results}}{% endblock %}
  File "/static/default/html/settings/index.html", line 40, in block "content"
    This grain's email address is {{ (result.profiles[1] and result.profiles[1].email) or result.profiles[0].email }}. If you want to continue using your current email, then you should <a href="https://support.google.com/mail/answer/10957?hl=en">set up forwarding</a>. Emails sent from this grain will appear to be from {{ result.profiles[0].email }} by default.
  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 397, in getattr
    return getattr(obj, attribute)
UndefinedError: mailpile.config.Checker object has no element 0

settings/index.html

DATA: defaultdict(<type 'str'>, {'status': 'success', 'url_protocol': 'http', 'name': None, 'title': 'Displayed settings', 'event_id': '53e1f7b1.00014.2b', 'elapsed': '0.000', 'message_count': 0, 'http_hostname': 'localhost', 'state': {'command_url': '/settings/', 'context_url': '/settings/', 'query_args': {'_method': u'GET', 'arg': [u'profiles']}}, 'http_method': 'GET', 'http_host': 'localhost:7003', 'result': {'profiles': []}, 'csrf': '165e642-dLjOJe7JWard1Z8myMnxcI56cJ8', 'command': 'print', 'message': 'Displayed settings', 'config': {'tags': {'1': {u'slug': u'mp_ham', u'name': u'mp_ham', u'display_order': 1.0, u'label': False, u'type': u'ham', u'display': u'invisible'}, '0': {u'name': u'Files', u'display_order': 38.0, u'search_terms': u'has:attachment', u'label_color': u'06-blue', u'template': u'files', u'type': u'tag', u'slug': u'files', u'icon': u'icon-document'}, '3': {u'name': u'Drafts', u'display_order': 35.0, u'display': u'priority', u'flag_editable': True, u'label_color': u'03-gray-dark', u'type': u'drafts', u'slug': u'drafts', u'icon': u'icon-compose'}, '2': {u'display_order': 2.0, u'display': u'invisible', u'type': u'ham', u'name': u'Ham', u'slug': u'ham'}, '5': {u'slug': u'mp_fwd', u'name': u'mp_fwd', u'display_order': 3.0, u'label': False, u'type': u'fwded', u'display': u'invisible'}, '4': {u'name': u'Spam', u'display_order': 36.0, u'display': u'priority', u'label_color': u'10-orange', u'type': u'spam', u'slug': u'spam', u'flag_hides': True, u'icon': u'icon-spam'}, '7': {u'name': u'Links', u'display_order': 39.0, u'search_terms': u'http', u'slug': u'links', u'type': u'tag', u'label_color': u'12-red', u'icon': u'icon-links'}, '6': {u'slug': u'mp_tag', u'name': u'mp_tag', u'display_order': 4.0, u'label': False, u'type': u'tagged', u'display': u'invisible'}, '9': {u'name': u'MaybeSpam', u'display_order': 5.0, u'display': u'invisible', u'label_color': u'10-orange', u'slug': u'maybespam', u'icon': u'icon-spam'}, '8': {u'name': u'All Mail', u'display_order': 40.0, u'search_terms': u'all:mail', u'slug': u'all-mail', u'type': u'tag', u'label_color': u'06-blue', u'icon': u'icon-logo'}, 'a': {u'name': u'Photos', u'display_order': 41.0, u'search_terms': u'att:jpg', u'label_color': u'08-green', u'template': u'photos', u'type': u'tag', u'slug': u'photos', u'icon': u'icon-photos'}, 'c': {u'name': u'Inbox', u'display_order': 34.0, u'display': u'priority', u'label_color': u'06-blue', u'type': u'inbox', u'slug': u'inbox', u'icon': u'icon-inbox'}, 'b': {u'slug': u'mp_rpl', u'name': u'mp_rpl', u'display_order': 6.0, u'label': False, u'type': u'replied', u'display': u'invisible'}, 'd': {u'name': u'Blank', u'display_order': 7.0, u'slug': u'blank', u'flag_editable': True, u'type': u'blank', u'display': u'invisible'}, '11': {u'slug': u'mp_enc-mixed-decrypted', u'name': u'mp_enc-mixed-decrypted', u'display_order': 28.0, u'label': False, u'type': u'attribute', u'display': u'invisible'}, '10': {u'slug': u'mp_enc-error', u'name': u'mp_enc-error', u'display_order': 27.0, u'label': False, u'type': u'attribute', u'display': u'invisible'}, '13': {u'slug': u'mp_enc-mixed-missingkey', u'name': u'mp_enc-mixed-missingkey', u'display_order': 30.0, u'label': False, u'type': u'attribute', u'display': u'invisible'}, '12': {u'slug': u'mp_enc-decrypted', u'name': u'mp_enc-decrypted', u'display_order': 29.0, u'label': False, u'type': u'attribute', u'display': u'invisible'}, 'e': {u'name': u'New', u'display_order': 8.0, u'slug': u'new', u'label_color': u'03-gray-dark', u'label': False, u'type': u'unread', u'display': u'invisible', u'icon': u'icon-new'}, '14': {u'slug': u'mp_enc-missingkey', u'name': u'mp_enc-missingkey', u'display_order': 37.0, u'label': False, u'type': u'attribute', u'display': u'invisible'}, 'g': {u'name': u'Outbox', u'display_order': 32.0, u'display': u'priority', u'label_color': u'06-blue', u'type': u'outbox', u'slug': u'outbox', u'icon': u'icon-outbox'}, 'f': {u'name': u'Trash', u'display_order': 33.0, u'display': u'priority', u'label_color': u'13-brown', u'type': u'trash', u'slug': u'trash', u'flag_hides': True, u'icon': u'icon-tra

from sandstorm.

lofidevops avatar lofidevops commented on May 22, 2024

Might be related (from wrench/log icon while on grain). Note I haven't ever configured Mailpile (I assume I do this from the cog?). I skipped the Sandstorm email setup, so if that's the cause I can run the config again.

** SANDSTORM SUPERVISOR: Starting up grain.
+ export HOME=/var
+ export LANG=en_US.UTF-8
+ cd /var
+ test -e mail
+ /usr/bin/python /mp --rescan all


{
    "mailboxes": 0, 
    "messages": 0, 
    "vcards": 0
}
+ /usr/bin/python /mp --www
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 595, in process_request_thread
    self.finish_request(request, client_address)
  File "/mailpile/httpd.py", line 375, in finish_request
    SimpleXMLRPCServer.finish_request(self, request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 651, in __init__
    self.handle()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
    method()
  File "/mailpile/httpd.py", line 265, in do_GET
    self.set_profile()
  File "/mailpile/httpd.py", line 220, in set_profile
    config.profiles = profiles
  File "/mailpile/config.py", line 570, in __setattr__
    self.__setitem__(attr, value)
  File "/mailpile/config.py", line 610, in __setitem__
    ) % (self._name, key, value))
ValueError: Invalid value for config/profiles: [{'name': 'xxxxxxxx', 'email': 'xxxxxxxxxx@localhost'}, {}]

from sandstorm.

jparyani avatar jparyani commented on May 22, 2024

Updated spk fixing the problem with utf8 characters in your name is uploaded at https://docs.google.com/file/d/0BzLCOahiEfRWMVo5Z1BwczFKaWs/edit. Let me know how it works out.

from sandstorm.

lofidevops avatar lofidevops commented on May 22, 2024

It works! (No error, instead a message about how to set up email forwarding.) Thanks :D

from sandstorm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.