Custom Query (121 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (70 - 72 of 121)

Ticket Resolution Summary Owner Reporter
#134 invalid Nested lists seems to be "dumped" incorrectly xi maksims.juvcenko@…

Reported by maksims.juvcenko@…, 4 years ago.

Description

Problem occurs, when nested list is dumped.

>>> s = {"a": ['aaa','bbb','ccc']}
>>> print yaml.dump(s, default_flow_style=False)
a:
- aaa
- bbb
- ccc

According to specification of YAML 1.1 nested sequence items must have entry token equal to " -" (two spaces and minus symbol), but in reality it lacks entry spaces. This issue creates limitations, when YAML documents are passed between PyYAML and JYaml interpreters.

Configuration:

  • PyYAML version: PyYAML 3.08
  • Python version: 2.5.2
#168 invalid Appengine query models xi martinhoarantes@…

Reported by martinhoarantes@…, 3 years ago.

Description

Hi, I´m using Google Appengine, language Python. I´d like to know how to query a model.

I´m using this code, but the output is miserable:

class GerarYAML(webapp.RequestHandler):
    def post(self):
        user = users.get_current_user() 
        if user: 
            formacaos = models.Formacao().all()
            experiencias = models.Experiencia().all()
            investigacaos = models.Investigacao().all() 
            distribuicaos = models.Distribuicao().all()
            
            docentes = models.Docente.all()
            docentes.filter('user =', users.get_current_user())
            
            for docente in docentes:
                for formacao in formacaos:
                    for experiencia in experiencias:
                        for investigacao in investigacaos:
                            for distribuicao in distribuicaos:
                                formacao.docente = docente.key()
    
                                'Nome: %s' % (docente.nome)
                                'Apelido: %s' % (docente.apelido)
                                'Unidade: %s' % (docente.unidade)
                                'Categoria: %s' % (docente.categoria)
                                'Regime: %s' % (docente.regime)
                                  
                                'Formacao: %s' % (formacao.formAno)
                                'Grau de Formacao: %s' % (formacao.formGrau)
                                'Area de Formacao: %s' % (formacao.formArea)
                                'Instituicao Academica: %s' % (formacao.formInstituicao)
                                'Classificacao Final: %s' % (formacao.formClassificacao)
                        
                                yaml.dump(docente, sys.stdout)
                                yaml.dump(formacao, sys.stdout)  
                                yaml.dump(experiencia, sys.stdout)
                                yaml.dump(investigacao, sys.stdout)
                                yaml.dump(distribuicao, sys.stdout)  
    
    
                                self.response.headers['Content-Type'] = 'application/yaml'
                                self.response.headers['Content-Disposition'] = 'filename = my.yaml'

Can someone point out, how can i solve this issue?

I´d like to download a file automatically when user submit a button with .yaml format and more or less formatted.

#183 invalid Simple event generated code fails with MemoryError while around 100 bytes yaml is expected as output xi matkor

Reported by matkor, 2 years ago.

Description

Attached code fails with:

Saving to file: 'test.yaml' Traceback (most recent call last):

File "yaml_test.py", line 40, in <module>

dump_dict(dumper, {"intro":"intro_value", "desc": "long description", "multiline": "line 1\nline2\nline3\n", "binary": binarydata })

File "yaml_test.py", line 15, in dump_dict

dumper.emit( events.ScalarEvent?(anchor=None, tag=None, implicit=(True, False), value=v) )

File "_yaml.pyx", line 1231, in _yaml.CEmitter.emit (ext/_yaml.c:14052) File "_yaml.pyx", line 1153, in _yaml.CEmitter._object_to_event (ext/_yaml.c:13123)

MemoryError?

Note: See TracQuery for help on using queries.