Git Product home page Git Product logo

ebscopy's People

Contributors

air-kyi avatar jessejensen avatar jjensen-ebsco avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ebscopy's Issues

invalid credentials

I tried to use ebscopy as described in the README but it doesn't work here. I don't really understand what all this arguments are for.

I have account (and are able to log in) on CINAHL (which is one of EBSC databases I

#!/usr/bin/env python2
import sys
import ebscopy

session = ebscopy.Session(user_id='MoonKid', password='*****', profile='profile', org='org', guest='n')
results = session.search('nursing research')

results.pprint()
session.end()
sys.exit()

But something is wrong with the credentials. What is profile, org and guest for?
Do I really need to login?

Traceback (most recent call last):
  File "./ebs.py", line 6, in <module>
    session = ebscopy.Session(user_id='MoonKid', password='*****', profile='profile', org='org', guest='n')
  File "build/bdist.linux-i686/egg/ebscopy/ebscopy.py", line 388, in __init__
  File "build/bdist.linux-i686/egg/ebscopy/ebscopy.py", line 347, in get
  File "build/bdist.linux-i686/egg/ebscopy/ebscopy.py", line 273, in connect
  File "build/bdist.linux-i686/egg/ebscopy/ebscopy.py", line 244, in request
ebscopy.ebscopy.AuthenticationError: Invalid credentials!

Allow multiple sessions in one authentication

Rather than having a Connection object that does authentication then creates a session, there should be multiple Session objects that implicitly create and share connections as needed.

s1 = ebscopy.Session()
s2 = ebscopy.Session()
r1 = s1.search("blue")
r2 = s2.search("red")
s1.disconnect
s2.disconnect

setup.py try to install 'logging'

I used the GitHub repository and tried to install ebscopy.
`sudo python3 ./setup.py install'

While this process the setup.py tried to install the logging package from PyPi.

#. There is no need to do that because it commes with Python itself. It is still there.

#. This extra-logging package crashes my complete Python system because the packge is buggy. e.g. Each call on pip implicite a import logging which fails, etc.

Maybe removing logging and datetime from the required-field in setup.py would do the job. But I am not quite aware of this part of Python.

All stringify functions should handle unicode

>>> record = s.retrieve(res_gw.record[0])
>>> record.pprint()
Title: Global warming [electronic resource] : engineering solutions / Ibrahim Dincer ... [et al.], editors.
Author: &lt;searchLink fieldCode=&quot;AR&quot; term=&quot;%22Din&#231;er%2C+İbrahim%22&quot;&gt;Din&#231;er, İbrahim&lt;/searchLink&gt;, 1964-
PLink: http://search.ebscohost.com/login.aspx?direct=true&site=eds-live&db=cat03706a&AN=uoc.8892414
DbId: cat03706a
An: uoc.8892414

>>> print record
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0130' in position 192: ordinal not in range(128)
>>> 

trouble installing with pip or conda

Hi, I'm getting an issue when I try to install this package. It's because of the IPA characters in the first line of the README - Windows encoding is cp1252, not utf8. Can we delete this? Or do you know how to force install while ignoring the characters?

(sdoh) C:\Users\kyi>pip install ebscopy
Collecting ebscopy
  Using cached ebscopy-0.1.21.tar.gz (40 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\kyi\AppData\Local\Temp\pip-install-xahmu1ds\ebscopy_70573cfdf3994b60b1cdc59af68eed60\setup.py", line 6, in <module>
          ld_md                                           = open('README.md').read()
        File "C:\Users\kyi\AppData\Local\anaconda3\envs\sdoh\lib\encodings\cp1252.py", line 23, in decode
          return codecs.charmap_decode(input,self.errors,decoding_table)[0]
      UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 51: character maps to <undefined>
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Python2 and/or 3?

Please specify in the README and in the sources (maybe with a shebang) and the setup.py if your package supports only Python2 and/or 3.

Issues with installing package from pip in Windows

Hi, thanks for accepting my pull request. I don't know how packages work from GitHub to pip, but it seems like the README update is not reflected in pip, because I am getting the same error as before when I do pip install ebscopy.

When I tried to install directly from GitHub, I get the following error message. Do you know if there is a way to update this package on pip to reflect the bug fix?

(sdoh) C:\Users\kyi>pip install git+https://github.com/ebsco/ebscopy.git@master
Collecting git+https://github.com/ebsco/ebscopy.git@master
  Cloning https://github.com/ebsco/ebscopy.git (to revision master) to c:\users\kyi\appdata\local\temp\pip-req-build-dmrtfwok
  Running command git clone --filter=blob:none --quiet https://github.com/ebsco/ebscopy.git 'C:\Users\kyi\AppData\Local\Temp\pip-req-build-dmrtfwok'
  Resolved https://github.com/ebsco/ebscopy.git to commit 658dcb91d64da5f5073b00cae77dab6cd45c3dbc
  Preparing metadata (setup.py) ... done
Collecting datetime
  Downloading DateTime-5.1-py3-none-any.whl (52 kB)
     ------------------------ 52.1/52.1 kB 529.9 kB/s eta 0:00:00
Collecting logging
  Downloading logging-0.4.9.6.tar.gz (96 kB)
     -------------------------- 96.0/96.0 kB 1.1 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 14, in <module>
        File "C:\Users\kyi\AppData\Local\anaconda3\envs\sdoh\lib\site-packages\setuptools\__init__.py", line 8, in <module>
          import _distutils_hack.override  # noqa: F401
        File "C:\Users\kyi\AppData\Local\anaconda3\envs\sdoh\lib\site-packages\_distutils_hack\override.py", line 1, in <module>
          __import__('_distutils_hack').do_override()
        File "C:\Users\kyi\AppData\Local\anaconda3\envs\sdoh\lib\site-packages\_distutils_hack\__init__.py", line 77, in do_override
          ensure_local_distutils()
        File "C:\Users\kyi\AppData\Local\anaconda3\envs\sdoh\lib\site-packages\_distutils_hack\__init__.py", line 63, in ensure_local_distutils
          core = importlib.import_module('distutils.core')
        File "C:\Users\kyi\AppData\Local\anaconda3\envs\sdoh\lib\importlib\__init__.py", line 126, in import_module
          return _bootstrap._gcd_import(name[level:], package, level)
        File "C:\Users\kyi\AppData\Local\anaconda3\envs\sdoh\lib\site-packages\setuptools\_distutils\core.py", line 22, in <module>
          from .dist import Distribution
        File "C:\Users\kyi\AppData\Local\anaconda3\envs\sdoh\lib\site-packages\setuptools\_distutils\dist.py", line 12, in <module>
          import logging
        File "C:\Users\kyi\AppData\Local\Temp\pip-install-wuhta1i5\logging_76896a2bb70544778a4ea4bf6500a471\logging\__init__.py", line 618
          raise NotImplementedError, 'emit must be implemented '\
                                   ^
      SyntaxError: invalid syntax
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Results objects should have equality and inequality defined

lt/gt based on hits count?

class MyClass:
 def __lt__(self, other):
      # return comparison
 def __le__(self, other)
      # return comparison
 def __eq__(self, other)
      # return comparison
 def __ne__(self, other)
      # return comparison
 def __gt__(self, other)
      # return comparison
 def __ge__(self, other)
      # return comparison

how is it "official"?

Please describe in your readme in which way your package is "official".

Are you working for ebsc? Are you supported with money by them? You have any "official" response from them about your package?

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.