Coder Social home page Coder Social logo

Comments (10)

thohan88 avatar thohan88 commented on August 25, 2024 1

I think I have located the cause. On line 208 of models.py, the documentation of CopyProperties includes the character in don’t. If I replace it with ' I get no errors.

So changing line 208:

                non-fatal errors impede copy progress but don’t cause failure.

to:

                non-fatal errors impede copy progress but don't cause failure.

does not crash RStudio and displays CopyProperties beautifully.
image
I tried a non-exhaustive list of other common special characters \\^$|~!@#$%^&*(){}_+:"<>?/;'[]-= which all worked fine. It appears to be an exclusive issue of the -character

Other copy-functions of azure-storage return parsed CopyProperties with the same doc-issue which confused me into thinking it was related to the copy-prefix.

from reticulate.

jjallaire avatar jjallaire commented on August 25, 2024 1

That's fantastic sleuthing, thank you so much!!!!

I have a fix here: 39ae098

Let me know if this gives you any more trouble!

from reticulate.

jjallaire avatar jjallaire commented on August 25, 2024

What version of Python are you using. I have so far been unable to reproduce on OS X running Anaconda Python 3.6. Will try on Windows shortly...

from reticulate.

jjallaire avatar jjallaire commented on August 25, 2024

Darnit, also unable to reproduce running Python 2.7 on Windows :-\

@dfalty could you work w/ @thohan88 to get a reproducible scenario here?

from reticulate.

ericwatt avatar ericwatt commented on August 25, 2024

I'm getting the same error in Windows 10 with a conda environment at Python 3.5.3. I haven't had a full crash, but it spits out the following message similar to example 3 above. Currently using reticulate 0.7 from CRAN. R 3.3.3 RStudio 1.0.141.

Error in py_call_impl(callable, dots$args, dots$keywords) : 
    ValueError: Function has keyword-only arguments or annotations, use getfullargspec() API which can support them

from reticulate.

jjallaire avatar jjallaire commented on August 25, 2024

Okay, I have repro'd both issues under Anaconda Python 3.6 on Windows. I have a fix for the error message on shutil$copy (just checked in) but not yet for the crash.

from reticulate.

ericwatt avatar ericwatt commented on August 25, 2024

I just installed the newest commit to see if this fixed it for me, but now I'm getting a new error. Not sure if this is related or not, let me know if you would like it moved to a new issue.

library(reticulate)
os <- import("os")
Error in py_initialize(config$python, config$libpython, config$pythonhome,  : 
  expecting a string

It's able to find python however:

> py_discover_config()
python:         C:\Users\watte\AppData\Local\CONTIN~1\ANACON~1\python.exe
libpython:      C:/Users/watte/AppData/Local/CONTIN~1/ANACON~1/python36.dll
pythonhome:     C:\Users\watte\AppData\Local\CONTIN~1\ANACON~1
version:        3.6.0 |Anaconda 4.3.1 (64-bit)| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)]
Architecture:   64bit
numpy:          C:\Users\watte\AppData\Local\CONTIN~1\ANACON~1\lib\site-packages\numpy
numpy_version:  1.11.3
> use_condaenv("cadme", required = TRUE)
> py_discover_config()
python:         C:\Users\watte\AppData\Local\Continuum\Anaconda3\envs\cadme\python.exe
libpython:      C:/Users/watte/AppData/Local/Continuum/Anaconda3/envs/cadme/python35.dll
pythonhome:     C:\Users\watte\AppData\Local\CONTIN~1\ANACON~1\envs\cadme
version:        3.5.3 |Continuum Analytics, Inc.| (default, Feb 22 2017, 21:28:42) [MSC v.1900 64 bit (AMD64)]
Architecture:   64bit
numpy:          C:\Users\watte\AppData\Local\CONTIN~1\ANACON~1\envs\cadme\lib\site-packages\numpy
numpy_version:  1.12.1

python versions found: 
 C:\Users\watte\AppData\Local\Continuum\Anaconda3\envs\cadme\python.exe
 C:\Users\watte\AppData\Local\CONTIN~1\ANACON~1\python.exe

from reticulate.

jjallaire avatar jjallaire commented on August 25, 2024

I've got the code required to reproduce the crash down to this:

library(reticulate)
asb <- import("azure.storage.blob")
py_get_attr(asb$CopyProperties, "__doc__")

Note that getting other attributes besides "doc" on the object (e.g. "module" or "class") work fine. There is something about the "doc" that is causing problems.

from reticulate.

thohan88 avatar thohan88 commented on August 25, 2024

Thanks for the quick response. It is indeed Anaconda Python 3.6.0 with azure-storage directly from git (v. 0.34.0). The latest commit solved the shdir-example. I could also run the code of @ericwatt without any issues.

py_get_attr(asb$CopyProperties, "__doc__") does indeed reproduce the crash. I wish I could be of more help in finding the cause.

from reticulate.

thohan88 avatar thohan88 commented on August 25, 2024

Works perfectly now, thank you!

from reticulate.

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.