Comments (10)
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Works perfectly now, thank you!
from reticulate.
Related Issues (20)
- Need to reinstall reticulate whenever I want to access arcpy HOT 4
- Timeout when calling Async python function HOT 1
- Corrupt dataframe when converting from pandas to R HOT 5
- Release reticulate 1.38.0 HOT 1
- Reticulate 1.38.0 for R 4.2.1 can install but not import numpy, ... HOT 5
- Error in reticulate::use_python(): failed to initialize requested version of Python HOT 2
- Namespace conflict with python config package HOT 1
- Python variables sourced via `reticulate::source_python()` are not contained within `py` list HOT 6
- Reticulate does not play nice with Rich progressbars HOT 1
- R Studio Global Options Conflict with `use_virtualenv()` embedded in `.onLoad()` HOT 1
- Converting a python datatype using mutate in dplyr HOT 6
- Feature request: export `conda_run2` HOT 3
- Extracting data from Google Earth Engine HOT 2
- can't use rpy2 inside reticulate-embedded python HOT 6
- Bug: Existence of system-wide version of a shared library causes `undefined symbol` error HOT 10
- Default Altair chart dimensions are not respected HOT 1
- This is not logical HOT 1
- Prompting user input HOT 5
- Reticulate can't handle large integer values: Seems to experience integer overflow when it exceeds the limit for 32-bit signed integers
- as.raw method for bytes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reticulate.