Giter VIP home page Giter VIP logo

tideway's People

Contributors

codefitz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tideway's Issues

Code refactor to reduce function duplication

A number of functions are duplicated (due to BMC's downstream API changes and my own laziness), these should be cleaned up.

  • Add deprecation warnings
  • Use name bindings for the new functions

Applies to v0.2.0 (currently dev branch)

ModuleNotFoundError: No module named '_tkinter'

Bug Summary

The module cannot be imported if the tkinter module is not installed in Python.

Module version

v0.2.0

Platform version

  • Python 3.7.3
  • RHEL 7

Steps to reproduce

  • install the 0.2.0 version
    pip install tideway==0.2.0
  • import the module in your code :
       #!/usr/bin/env python3
       # coding: utf-8
       import os
       import sys
       from pathlib import Path
       import argparse
       import json
       import tideway

Actual results

The following error message appears with running the code :

    import tideway
  File "/venv/lib/python3.7/site-packages/tideway-0.2.0-py3.7.egg/tideway/__init__.py", line 4, in <module>
    from tideway import main, \
  File "/venv/lib/python3.7/site-packages/tideway-0.2.0-py3.7.egg/tideway/main.py", line 4, in <module>
    from tkinter import BASELINE
  File "/usr/local/lib/python3.7/tkinter/__init__.py", line 36, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'

Additional information

tkinter is imported in main.py as follows :

from tkinter import BASELINE

API calls won't work on API v1.3

The newest release of Discovery (12.3/21.3) Uses API version 1.3.

API calls won't work because the header bearer pre-text is now case sensitive, whereas lowercase was accepted before.

Example: Bearer NDpkaXNjb3B==

Fix needs to be applied to tideway/discoRequests.py line 8

def url_and_headers(target,token,api_endpoint,response):
    url = target + api_endpoint
    headers = {"Accept": response, "Authorization":"bearer " + str(token) }
    return url, headers

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.