I have a repo whose name is not a standard Julia module name, say git#github.com:ylxdzsw/oh-my-julia.jl.git.
I used to develop and use it via Pkg.clone("git#github.com:ylxdzsw/oh-my-julia.jl.git", "OhMyJulia") and it works well. However, it is deprecated and the equivalent way to clone a package in Julia 0.7 is using ] dev git#github.com:ylxdzsw/oh-my-julia.jl.git, but where should I specify the package name?
(v0.7) pkg> dev git#github.com:ylxdzsw/oh-my-julia.jl.git OhMyJulia
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Updating git-repo `git#github.com:ylxdzsw/oh-my-julia.jl.git`
ERROR: cannot determine package name from URL or path: git#github.com:ylxdzsw/oh-my-julia.jl.git
julia> using Pkg
julia> Pkg.develop(PackageSpec(url="git#github.com:ylxdzsw/oh-my-julia.jl.git", name="OhMyJulia"))
Updating git-repo `git#github.com:ylxdzsw/oh-my-julia.jl.git`
ERROR: cannot determine package name from URL or path: git#github.com:ylxdzsw/oh-my-julia.jl.git
Stacktrace:
[1] pkgerror(::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/Types.jl:120
[2] parse_package!(::Pkg.Types.Context, ::Pkg.Types.PackageSpec, ::String) at ./logging.jl:313
[3] (::getfield(Pkg.Types, Symbol("##25#28")){Pkg.Types.Context,Array{Pkg.Types.PackageSpec,1},String})(::LibGit2.CachedCredentials) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/Types.jl:567
[4] shred!(::getfield(Pkg.Types, Symbol("##25#28")){Pkg.Types.Context,Array{Pkg.Types.PackageSpec,1},String}, ::LibGit2.CachedCredentials) at ./secretbuffer.jl:184
[5] handle_repos_develop! at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/Types.jl:498 [inlined]
[6] #add_or_develop#13(::Symbol, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:52
[7] #add_or_develop at ./none:0 [inlined]
[8] #add_or_develop#12 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:29 [inlined]
[9] #add_or_develop at ./none:0 [inlined]
[10] #add_or_develop#10(::Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol},NamedTuple{(:mode, :shared),Tuple{Symbol,Bool}}}, ::Function, ::Pkg.Types.PackageSpec) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:27
[11] #add_or_develop at ./none:0 [inlined]
[12] #develop#19 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:70 [inlined]
[13] develop(::Pkg.Types.PackageSpec) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:70
[14] top-level scope at none:0
It seems that the name is discarded if you already provide a url. Julia tries to parse your project's URL to extract the name. However, you used dash (-) in what should be the Package name. This eventually gives an error because types in julia cannot have dash in between characters since it is an operator.
You can specify the name of the package by creating a project file (i.e. Project.toml) for your package's root directory with correct name entry.
Another simple solution is to change the repository's name to OhMyJulia without the dashes so the name can be determined from the URL provided. But you should add Project.toml file it is the correct way to specify package properties (otherwise you cannot use your project within another project that contains a project file)
See: https://docs.julialang.org/en/v1/stdlib/Pkg/
Related
I'm new to React and trying vitejs for the first time. I keep getting this error in the console when I start the server and I have no idea as to how to troubleshoot this error. Here is the error:
Use GraphQL at http://localhost:3001/graphql
[1] X [ERROR] Two output files share the same path but have different contents: node_modules\.vite\deps_temp\#apollo_Client.js
[1]
[1] C:\Users\judo2\Documents\dev\my-sites\mat-house\client\node_modules\esbuild\lib\main.js:1624
[1] let error = new Error(`${text}${summary}`);
[1] ^
[1]
[1] Error: Build failed with 1 error:
[1] error: Two output files share the same path but have different contents: node_modules\.vite\deps_temp\#apollo_Client.js
[1] at failureErrorWithLog (C:\Users\judo2\Documents\dev\my-sites\mat-house\client\node_modules\esbuild\lib\main.js:1624:15)
[1] at C:\Users\judo2\Documents\dev\my-sites\mat-house\client\node_modules\esbuild\lib\main.js:1266:28
[1] at runOnEndCallbacks (C:\Users\judo2\Documents\dev\my-sites\mat-house\client\node_modules\esbuild\lib\main.js:1046:63)
[1] at buildResponseToResult (C:\Users\judo2\Documents\dev\my-sites\mat-house\client\node_modules\esbuild\lib\main.js:1264:7)
[1] at C:\Users\judo2\Documents\dev\my-sites\mat-house\client\node_modules\esbuild\lib\main.js:1377:14
[1] at C:\Users\judo2\Documents\dev\my-sites\mat-house\client\node_modules\esbuild\lib\main.js:678:9
[1] at handleIncomingPacket (C:\Users\judo2\Documents\dev\my-sites\mat-house\client\node_modules\esbuild\lib\main.js:775:9)
[1] at Socket.readFromStdout (C:\Users\judo2\Documents\dev\my-sites\mat-house\client\node_modules\esbuild\lib\main.js:644:7)
[1] at Socket.emit (node:events:527:28)
[1] at addChunk (node:internal/streams/readable:315:12) {
[1] errors: [
[1] {
[1] detail: undefined,
[1] id: '',
[1] location: null,
[1] notes: [],
[1] pluginName: '',
[1] text: 'Two output files share the same path but have different contents: node_modules\\.vite\\deps_temp\\#apollo_Client.js'
[1] }
[1] ],
[1] warnings: []
[1] }
I found out that in my App.jsx file I was trying to import from '#apollo/Client' rather than '#apollo/client'. I found it by accident when I tried rebuilding it react and that one showed the file where the issue was happening where in vite it did not.
**import React from "react";**
import React from "React"; -> error
The same error occurred to me and I solved it with the above I was using react
I am new to the OpenStack environment and started to get into it with a small DevStack setup. I worked the following instructions on a Ubuntu 18.04 machine through and everything worked fine. In order to play with some dns zones I started to research about designate. After adapting the following instructions to my setup I got some errors.
Executing stack.sh produces the following error:
++/opt/stack/designate/devstack/plugin.sh:source:5 set +o xtrace
2021-01-12 21:44:39.009 | Initializing Designate
DROP DATABASE
Could not load 'database': type object 'deprecated' has no attribute 'WALLABY'
Could not load 'pool': type object 'deprecated' has no attribute 'WALLABY'
Could not load 'tlds': type object 'deprecated' has no attribute 'WALLABY'
usage: designate [-h] [--config-dir DIR] [--config-file PATH] [--debug]
[--log-config-append PATH] [--log-date-format DATE_FORMAT]
[--log-dir LOG_DIR] [--log-file PATH] [--nodebug]
[--nouse-journal] [--nouse-json] [--nouse-syslog]
[--nowatch-log-file]
[--syslog-log-facility SYSLOG_LOG_FACILITY] [--use-journal]
[--use-json] [--use-syslog] [--watch-log-file]
{} ...
designate: error: argument category: invalid choice: 'database' (choose from )
Error on exit
World dumping... see /opt/stack/logs/worlddump-2021-01-12-214442.txt for details
nova-compute: no process found
neutron-dhcp-agent: no process found
neutron-l3-agent: no process found
neutron-metadata-agent: no process found
neutron-openvswitch-agent: no process found
I was not sure if my setup was legit. So I tried to use the example config from the designate tutorial. But the same problem occurred.
My actual local.conf:
[[local|localrc]]
USE_PYTHON3=True
ADMIN_PASSWORD=***
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
SERVICE_TOKEN=$ADMIN_PASSWORD
DEST=/opt/stack
SERVICE_HOST=192.168.1.***
HOST_IP=$SERVICE_HOST
disable_service mysql
enable_service postgresql
enable_plugin designate https://opendev.org/openstack/designate
enable_service tempest
Checking the plugin.sh. It looks like the error occurred from this function:
function init_designate {
# (Re)create designate database
recreate_database designate utf8
# Init and migrate designate database
$DESIGNATE_BIN_DIR/designate-manage database sync
init_designate_backend
}
Hope somebody can give me a hint to run DevStack with designate.
Thanks in advance.
The issue you are having is a version mismatch with the cloud install and the designate plugin. Designate is expecting a newer verison of the oslo_log package.
Check that the "devstack" version you have checked out is on the master branch.
The line:
enable_plugin designate https://opendev.org/openstack/designate
Is pulling the master branch of designate for the devstack plugin.
If you are trying to install on a stable branch version OpenStack, you will need to specify a reference for the devstack plugin as well (example, stable/victoria):
enable_plugin designate https://opendev.org/openstack/designate stable/victoria
As mentioned above, you will also need to enable the designate services:
enable_service designate,designate-central,designate-api,designate-worker,designate-producer,designate-mdns
I have recently started to get an error using blogdown to build my website. I am using the academic template, and the error started after I reinstalled blogdown a few days ago to deal with the fact that the academic template started using Hugo modules. The build command works fines, and I can deploy the website with no further errors.
The error:
blogdown::serve_site()
Error in !server$daemon : invalid argument type
sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.1 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] Rcpp_1.0.5 bookdown_0.20 digest_0.6.26 later_1.1.0.1
[5] R6_2.4.1 jsonlite_1.7.0 magrittr_1.5 evaluate_0.14
[9] blogdown_0.21.22 rlang_0.4.8 promises_1.1.1 rstudioapi_0.11
[13] rmarkdown_2.3 tools_4.0.2 servr_0.18 httpuv_1.5.4
[17] xfun_0.18 yaml_2.2.1 compiler_4.0.2 htmltools_0.5.0
[21] knitr_1.29
And my hugo version
> blogdown::hugo_version()
[1] ‘0.76.5’
Your servr package is not the latest version. You need to install the latest version:
install.packages('servr')
Or update all packages:
update.packages(ask = FALSE)
How to proceed to add a package through Coda.add. I am receiving the following alert and I don’t know how to proceed
Julia> Conda.add("scipy.optimize")
[ Info: Running `conda install -y scipy.optimize` in root environment
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- scipy.optimize
Current channels:
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
ERROR: failed process: Process(setenv(`'C:\Users\user\.julia\conda\3\Scripts\conda.exe' install -y scipy.optimize`,["PATH=C:\\Users\\user\\.julia\\conda\\3\\Library\\bin;C:\\Users\\user\\.julia\\conda\\3\\Library\\bin;C:\\Rtools\\bin;C:\\Users\\user\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\user\\AppData\\Local\\atom\\bin;C:\\Users\\user\\AppData\\Local\\GitHubDesktop\\bin;C:\\Program Files\\Git\\cmd;C:\\Windows;C:\\WINDOWS\\system32;C:\\Program Files\\JetBrains\\IntelliJ IDEA 2018.3.2\\bin;C:\\Users\\user\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\user\\AppData\\Local\\atom\\app-1.33.1\\resources\\app\\apm\\bin;C:\\Users\\user\\AppData\\Local\\Julia-1.0.3\\bin;;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\netCDF 4.7.4\\bin;C:\\ProgramData\\chocolatey\\bin;C:\\Users\\user\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\user\\AppData\\Local\\GitHubDesktop\\bin;C:\\Program Files\\Git\\cmd;C:\\Windows;C:\\WINDOWS\\system32;C:\\Program Files\\JetBrains\\IntelliJ IDEA 2018.3.2\\bin;C:\\Users\\user\\AppData\\Local\\atom\\app-1.33.1\\resources\\app\\apm\\bin;C:\\Users\\user\\AppData\\Local\\Julia-1.0.3\\bin;C:\\Users\\user\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\user\\AppData\\Local\\Programs\\Julia 1.5.1\\bin;;%USERPROFILE%\\AppData\\Local\\Microsoft\\WindowsApps", "USERDOMAIN_ROAMINGPROFILE=GALILEO", "HOMEPATH=\\Users\\user", "PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC", "SESSIONNAME=Console", "SYSTEMROOT=C:\\WINDOWS", "APPDATA=C:\\Users\\user\\AppData\\Roaming", "PSMODULEPATH=C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules;C:\\Program Files\\Intel\\Wired Networking\\", "COMMONPROGRAMW6432=C:\\Program Files\\Common Files", "PROGRAMDATA=C:\\ProgramData" … "PROGRAMFILES=C:\\Program Files", "CHOCOLATEYLASTPATHUPDATE=132430196948222515", "LOGONSERVER=\\\\GALILEO", "DRIVERDATA=C:\\Windows\\System32\\Drivers\\DriverData", "CONDA_PREFIX=C:\\Users\\user\\.julia\\conda\\3", "FPS_BROWSER_USER_PROFILE_STRING=Default", "SYSTEMDRIVE=C:", "FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer", "PROCESSOR_ARCHITECTURE=AMD64", "OPENBLAS_MAIN_FREE=1"]), ProcessExited(1)) [1]
scipy.optimize is a part of scipy so this is all what you need:
julia> using Conda
julia> Conda.add("scipy");
julia> using PyCall
julia> so = pyimport("scipy.optimize")
PyObject <module 'scipy.optimize' from 'c:\\JuliaPkg\\Julia1.5.1\\conda\\3\\lib\\site-packages\\scipy\\optimize\\__init__.py'>
In the Drupal 7.x project I'm developing, I'm using Domain Access module.
Somehow, when I try to access the Settings tab (admin/structure/domain/settings) I get a WSOD.
ERROR LOG:
[Wed May 07 11:20:08 2014] [error] [client 127.0.0.1] PHP Fatal error: Call to undefined function object_log() in /var/www/MYDRUPALPROJECT/sites/all/modules/custom/domain_bonus/domain_bonus_login_restrict/domain_bonus_login_restrict.module on line 55, referer: http:// MYDRUPALPROJECT/en/admin/structure/domain
Content from the file in question:
......
/**
*Implements hook_form_alter().
*/
function domain_bonus_login_restrict_form_alter(&$form, &$form_state, $form_id) {
switch ($form_id) {
.....
// Provide option to enable / disable restriction on domain settings form.
case 'domain_configure_form':
(LINE 55:) object_log('form_id ' . time(), $form_id);
.....
This custom module is a copy of the contrib module with just some simple modifications that don't involve the line in question.
Anyone have any idea what can be the cause of this?
Should I share any other relevant information to help you understand this?
Thank you!
Solved!
The problem was that the contrib module Domain Bonus: Login Restrict comes with the following lines of code:
object_log('form_id ' . time(), $form_id);
object_log('form_state ' . time(), $form_state);
object_log('form ' . time(), $form);
Those lines are used to debbug, probably during the module development.
object_log() function is a function from the object log module that can be used to debbug, more specifically to check variables value in a specific part of the code.
Since in the module .info file isn't defined that the Domain Bonus: Login Restrict module depends on the Object Log module, the Object Log module wasn't even installed in our project... In that conditions when reading that line, Drupal crashes.
So, for this function to work Object Log module needs to be installed, this module needs Devel module to work. Or simply just comment or delete those lines.
Cheers.