Git Product home page Git Product logo

pycrastinate's People

Contributors

grafuls avatar isaacbernat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

grafuls

pycrastinate's Issues

Encoding errors

Running under Python 2 I ran into a UnicodeEncodeError in process_result:

...
2015-07-16 11:24:38.458050 finish pycrastinate module: save_to_file
2015-07-16 11:24:38.458059 start  pycrastinate module: process_results
Traceback (most recent call last):
  File "/Users/carlton/bin/pycrastinate.py", line 22, in <module>
    pycrastinate(sys.argv[1])
  File "/Users/carlton/bin/pycrastinate.py", line 18, in pycrastinate
    return run(_cfg.pipeline, _cfg.data, _cfg.enclose)
  File "/Users/carlton/bin/pycrastinate.py", line 10, in run
    OrderedDict(sorted(pipeline.items())).values(), [])
  File "/Users/carlton/bin/pycrastinate.py", line 9, in <lambda>
    return reduce(lambda results, func: enclose(func, (config, results)),
  File "/Users/carlton/Documents/pycrastinate/enclose/print_log.py", line 13, in print_log
    results = func(*params)
  File "/Users/carlton/Documents/pycrastinate/modules/process_results.py", line 7, in process_results
    deque(data, 0)
  File "/Users/carlton/Documents/pycrastinate/modules/save_to_file.py", line 12, in save_to_file
    for d in data:
  File "/Users/carlton/Documents/pycrastinate/modules/print_summary.py", line 2, in print_summary
    report = "\n".join(data)
  File "/Users/carlton/Documents/pycrastinate/modules/text_summary.py", line 20, in <genexpr>
    repeat(el, 1) if isinstance(el, str)
  File "/Users/carlton/Documents/pycrastinate/modules/text_summary.py", line 13, in nested_report
    str_attrs = [str(el) for el in (line[attr] for attr in col_order)]
UnicodeEncodeError: 'ascii' codec can't encode characters in position 30-31: ordinal not in range(128)

So I switched to Python 3 — which runs ok but writes byte strings to the report file:

$ cat report.txt 
================================================================================
token > date > email > line_count > file_path > code
Generated at: 2015-07-16 11:27:31.191042
================================================================================
b'TODO'
  b'./MY_FILE.PY'
      ...

(Again, happy to have a look at this but wanted to get it down.)

`save_to_file` not respecting config

Hiya,

I'm just getting started with pycrastinate, so maybe I'll resolve this but it looks to me as if config values are not being respected.

    "save_to_file": {
        "path": "./",
        "filename": "report.txt",
        "overwrite": True,
    },

Leads to:

  File "/Users/carlton/Documents/pycrastinate/modules/save_to_file.py", line 10, in save_to_file
    raise Exception("'{}' already exists".format(filename))
Exception: 'report.txt' already exists

I'm also not having any luck moving the save location by setting path.

I'll look into this later — I'm enjoying the early progress for now :-) — but I wanted to get this down.

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.